Switching databases

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
7/25/2006 7:31:28 AM
Gravatar
Total Posts 26
Microsoft MVP in C#

Switching databases

Just curious if anybody has had experience with switching databases while using mojoPortal?  For example, if I'm currently running PostgreSQL, and I want to switch to MySQL (or MSSQL)?  I'd like to think that this would be a relatively simple and painless thing, but I could be wrong.
7/25/2006 2:59:34 PM
Gravatar
Total Posts 18439

Re: Switching databases

I'd say its doable but possibly challenging for some scenarios. Like if you're going into MS SQL you'd have to do Identity inserts. I'm sure there are tools that can ease the difficulty. I think its probably easier to go from MS SQL to MySQL than the other way around because its easy to insert values into identity columns with MySQL, no special syntax required, not positive but I think pgsql is easy to insert into identity columns too.

I've never done it with mojoportal, migrate data to a different platform, but I did migrate data from MS SQL into MySQL when I migrated my joeaudette.com site from Rainbow to mojoPortal.

Should be easier to change dbs in mojoportal since the tables are already defined the same.

I used SqlYog (Windows) to migrate, it let me write a query against an odbc connection to MS SQL very easily and insert based on the select from MS SQL.

Might be possible to go from any one to another by exporting csv files from the tables and importing them.

Another good tool that might come in handy is Aqua Data Studio, it can talk to all the different dbs, I haven't really dug into its features to know about migrating data but it wouldn't surprise me if it has an easy way to do it. Its free for personal use and reasonable priced for commercial use, runs on java so you can install it on windows or linux

Eventually I want to do away with the integer identity columns and use guids for all ids. This will make it easier to combine data from different mojo installations without clashing on ids.

Joe
7/25/2006 6:32:36 PM
Gravatar
Total Posts 26
Microsoft MVP in C#

Re: Switching databases

Well, thinking of going from PostgreSQL to MSSQL2K5.  I was thinking it might be easiest if I just write a dirty little one shot utility to do the conversion for me.

I like the idea of using GUID's instead of identity columns.  I've done it both ways, and it just seems that the GUID's are easier in the long run.
You must sign in to post in the forums. This thread is closed to new posts.