How do I migrate from SQL Server to PostgreSQL using flyway? - flyway

Hi I have source SQL DB and destination RDS PostgreSQL DB.
I want to migrate by using flyway. First is it possible ?
If possible then can anybody help me with solutions?

Flyway is a tool for running scripts, rollbacks, targeted piecemeal deployments, all sorts of other stuff. However, it doesn't generate scripts. You have to provide it with syntax appropriate to the database system you're deploying to. T-SQL isn't the same as PostgreSQL. Nothing in Flyway will allow you to translate the T-SQL. You will have to do that work on your own. Once completed though, Flyway will absolutely be able to deploy those changes to your new database.

Related

Migrating from MSAccessDB to SQLLite

I have a application written long time back using the MS Access as the configuration database. It was using OLEDB Provider (Jet Engine) for retrieving data from the configuration DB.
I intended to replace MS Access Db lightweight RDBMS which requires no additional installation requirements. Thinking of using SQLLite which seems to suite my needs. Wanted to check if anyone have invovled in migrating the data from MSAccess to SQL Lite. Is there an easy way to migrate the schema and data?
You can quite much transfer data and schema if you setup the ODBC driver for sqlite.
Once done then you can run append queries in Access to export to the sqlite database.
Of course with sqlite you don't get or have forms, reports or a coding language. So, you have to replace that part of Access with some other kind of development platform.
So, you need to get a ODBC driver for sqlite.
This one works well:
http://www.ch-werner.de/sqliteodbc/
So, once you done the above, then you can link from access to sql lite. You can even edit data with Access forms, or even run access reports against data in sqlite.

Phonegap Local SQLite to remote MySQL

I'm making an in-house application for a company and they want me to use Phonegap for the mobile application. After searching, I decided to go on and use SQLite plugin for the local storage but they have this requirement that when the device goes online all the data on the local storage will synced automatically to the remote MYSql db. I read about deferred functions in jQuery but I'm not quite familiar on how to use them.
Are there any alternatives to achieve this requirement?
I'm currently investigating to achieve a similar goal.
I need to develop an IONIC/Phonegap app that can potentially do CRUD operations with the followings DB engines: MySQL / Postgres / Microsoft SQL Server / Oracle (not simultaneously).
TypeORM seems to be the solution, but I still couldn't connect from Android device to remote MySQL DB.
If you work with TypeORM over NodeJS directly is very easy to have an example up and running and do some CRUD operations with the supported DB engines (just follow the examples and documentation in the previous link).
I'm asking at https://github.com/typeorm/typeorm/issues/548 if anybody has achieved an Android-MySQL connection using TypeORM.

How to sync two ASP.NET Membership databases

I have a local and an azure ASP.NET Membership database. I need to be sync them both. Wondering if anyone has found a easy way to do this? The table structure seems simple enough but would rather pull from azure than push. Is there a routine or tool I do not know about to do this by now?
Thanks
-Ken
This would be a suitable job for the Microsoft Sync Framework.
You create a service or scheduled task that makes the necessary calls. Have this running on your server and you can pull from the Azure database and sync with the local one. It can be set up to sync one way or two ways.

Use DataContext.CreateDatabase in SQL Azure

I am trying to re-deploy my ASP.NET MVC3 application across several different environments and would like to try using SQL Azure. I'd like to use my existing LINQ structure and CreateDatabase to create these databases.
I am wondering how I can use CreateDatabase with SQL Azure since the USE statement doesn't work on the platform.
Please answer with any suggestions or if there might be a better way to do this.
http://msdn.microsoft.com/en-us/library/ee336274.aspx
Important: The CREATE DATABASE
statement must be the only statement
in a Transact-SQL batch. You must be
connected to the master database when
executing the CREATE DATABASE
statement.
You'll have to find a way to fit in this premise. Maybe it's not possible.
Have you actually tried executing this?
I've deployed nHibernate apps to SQL Azure - these apps call CREATE DATABASE somewhere inside the nHibernate layer and they work OK.
Best advice I can give is to try it - then come back with any specific errors you see. There may be some changes to make, but I think these should be small.

Using ASP.NET tables generated by aspnet_regsql.exe in a SQLite database

I'm building a small ASP.NET MVC site where I want to use SQLite. While I already know how I will be connecting to the database (using DbLinq), I don't understand how to put the ASP.NET tables generated by aspnet_regsql.exe into an SQLite database.
I've used the regsql tool before with SQL Server, but never with SQLite. How do I create them for the SQLite DB?
One strategy that I think might somehow work is:
Use aspnet_regsql.exe to create the tables into an empty SQL Server database
Script all the objects in the database into T-SQL
Apply the T-SQL to the SQLite DB (how?)
Take a look at http://salient.codeplex.com
the Web.SQLite directory contains a drop in replacement for the default SQL providers.
It was a proof of concept that turned out ok. It uses EF, so is not as performant as it could be but should service low/medium traffic sites without issue.
You should be able to exclude all other files except that subdirectory and build it in isolation if desired. This will allow you to also trim the references.
Let me know if you have any issues.
You could try it with SQL Server Compact Edition 4 which is an embeddable SQL engine like SQLite but has an easier upgrade path if you need to grow it up to SQL Express or SQL Server.
Unfortunately the aspnet_regsql will not work with SQLite, so your strategy is essentially the correct approach. However, I would suggest looking at something like Roger Martin's Gallery Server Pro, which uses SQLite and already has the Membership, Role, and Profile provider tables scripted. You can make use of the script. See Roger's Code Project article from more information.

Resources