#!/bin/sh # Workbench Table Data copy script # # Execute this to copy table data from a source RDBMS to MySQL. # Edit the options below to customize it. You will need to provide passwords, at least. # # Source DB: Mssql@maa_mysql_test (Microsoft SQL Server) # Target DB: Mysql@127.0.0.1:3306 # Source and target DB passwords arg_source_password= arg_target_password= if [ -z "$arg_source_password" ] && [ -z "$arg_target_password" ] ; then echo WARNING: Both source and target RDBMSes passwords are empty. You should edit this file to set them. fi arg_worker_count=2 # Uncomment the following options according to your needs # Whether target tables should be truncated before copy # arg_truncate_target=--truncate-target # Enable debugging output # arg_debug_output=--log-level=debug3 /Applications/MySQLWorkbench.app/Contents/MacOS/wbcopytables --odbc-source="DSN=maa_mysql_test;DATABASE=maa_mysql_test;UID=sa" --target="root@127.0.0.1:3306" --source-password="$arg_source_password" --target-password="$arg_target_password" --thread-count=$arg_worker_count $arg_truncate_target $arg_debug_output --table '[maa_mysql_test]' '[dbo].[WebSubjects]' '`maa_mysql_test`' '`dbo_WebSubjects`' '[SubjectID], CAST([Subject] as NVARCHAR(255)) as [Subject], [Cdate], [Mdate]'