Project

General

Profile

Migration from MySQL to MSSQL. Is it possible?

Added by Anatolii Ivashyna over 11 years ago

Hi all!

Since Redmine have supported MSSQL as DB backend, does it support migration from mysql to mssql?

Thanks in advance!


Replies (4)

RE: Migration from MySQL to MSSQL. Is it possible? - Added by Etienne Massip over 11 years ago

It is as much possible as it is to migrate from MySQL to PostgreSQL or sqlite3, PG to sqlite3, MySQL or MSSQL etc.

It's not related to Redmine application but to the way you're doing the data migration (you should create an empty MSSQL database to get the right schema before you migrate your data).

RE: Migration from MySQL to MSSQL. Is it possible? - Added by Anatolii Ivashyna over 11 years ago

OK, i'm understand. Thanks for reply :)

RE: Migration from MySQL to MSSQL. Is it possible? - Added by Jean-Baptiste Barth over 11 years ago

A plain old SQL dump isn't portable by default. Mysql provide some tools to achieve a certain level of compatibility though.

The "yaml_db" gem can help for that circumstances. It allows you to dump your whole database in a neutral format (YAML) and re-import it through ActiveRecord so there shouldn't be much trouble. The gem can be added to your Gemfile.local and once installed (bundle install), it adds some rake tasks to your instance (see rake -T or the project docs for more informations).

RE: Migration from MySQL to MSSQL. Is it possible? - Added by David Robinson over 4 years ago

The solution on this stack overflow question: https://stackoverflow.com/questions/1670154/convert-a-ruby-on-rails-app-from-sqlite-to-mysql helped me with this.
I just couldn't get it to load `wiki_content_versions`, because of issues with NVARCHAR (MAX) to VARBINARY (MAX) conversion, so I had to transfer that one manually.

    (1-4/4)