0
私は、MySQLの現在のDBをSQL Serverに移行する必要があるという状況があります。テスト目的のために、私はAWS上にRDSインスタンス(SQL Server)を作成し、isqlを使用してコマンドライン経由で接続するとうまく動作します。 しかし、MSSQL互換モードでphpmyadmin経由でMySQL DB全体をエクスポートし、上記で作成したSQL Serverにインポートしようとしました。 私は、このコマンドを実行するたびに -UbuntuマシンからSQL ServerにSQLDumpをインポートする
isql -v MSSQL user 'password' db_name < path_to_sql
私はこのエラーを取得する -
SQL> CREATE TABLE "access_levels" (
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'access_levels'.
[ISQL]ERROR: Could not SQLExecute
SQL> "id" int NOT NULL,
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'id'.
[ISQL]ERROR: Could not SQLExecute
SQL> "user_id" int NOT NULL,
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'user_id'.
[ISQL]ERROR: Could not SQLExecute
SQL> "brand_id" int NOT NULL,
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'brand_id'.
[ISQL]ERROR: Could not SQLExecute
SQL> "outlet_id" int NOT NULL,
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'outlet_id'.
[ISQL]ERROR: Could not SQLExecute
SQL> "feature_id" int NOT NULL,
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'feature_id'.
[ISQL]ERROR: Could not SQLExecute
SQL> "access" int NOT NULL,
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'access'.
[ISQL]ERROR: Could not SQLExecute
SQL> "created_at" timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'created_at'.
[ISQL]ERROR: Could not SQLExecute
SQL> "updated_at" timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near 'updated_at'.
[ISQL]ERROR: Could not SQLExecute
SQL>);
[37000][unixODBC][FreeTDS][SQL Server]Incorrect syntax near ')'.
[ISQL]ERROR: Could not SQLExecute
次のために、比較的新しいテーブルの1
CREATE TABLE "access_levels" (
"id" int NOT NULL,
"user_id" int NOT NULL,
"brand_id" int NOT NULL,
"outlet_id" int NOT NULL,
"feature_id" int NOT NULL,
"access" int NOT NULL,
"created_at" timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
"updated_at" timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
);
のための私のSQLファイルからの抜粋ですSQL Server、任意のヘルプが評価されます!単一引用符ではなく二重引用符を使用して