AngryHacker
AngryHacker

Reputation: 61646

Anyway to move the schema (and possibly data) from Microsoft SQL Server to MemSQL?

I am trying to move my project from MSSQL to MemSQL and running into the initial issue of recreating a ton of tables and associated tables.

Is there a faster tool than extracting manually and fidgeting with data?

I tried SQL Server Import & Export Wizard and tried to export it to MemSQL masquerading as MySQL (since they are binary protocol level compatible), but got a ton of errors even on the simplest of tables.

Am I missing something simple?

Upvotes: 1

Views: 393

Answers (1)

Joseph Victor
Joseph Victor

Reputation: 829

Were the errors in the create table statements? Unfortunately, MemSQL create table statements have one small caveat beyond MySQL.

I don't know this tool in particular, but the most likely thing such a tool probably gets wrong is forgetting to set a shard key if your table doesn't already have a primary key, or a secondary unique key not containing the shard key.

If you can get reasonable shard keys on your create table statements, moving the data should be easy enough. The general rules are

1) a table needs either a primary key or a shard key

2) unique keys must contain the shard key.

http://docs.memsql.com/4.1/concepts/distributed_sql/

If you're getting some other error, can you paste it here?

Upvotes: 1

Related Questions