Migrating From MS SQL Server 2008 to MySQL - mysql

I have been put in charge of migrating the data out of an MS SQL Server 2008 database into MySQL. I have installed Microsoft SQL Server Management Studio, have started the SQL Server and SQL Server Browser services, have enabled the TCP/IP and Named Pipes protocols for the sql database via the SQL Server Configuration Manager, and created a user with access via SQL Authentication instead of Windows Authentication. I am trying to get the data out using MySQL Migration Tool. When I try to connect to the server I get the following error:
Connecting to source database and retrieve schemata names.
Initializing JDBC driver ... Driver class MS SQL JDBC Driver Opening
connection ... Connection
jdbc:jtds:sqlserver://ukoff032/sqlexpress:1433/DbMain;user=remoteAccess;password=password;charset=utf-8;domain=
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringMssql.getSchemata :Network error IOException:
Connection refused: connect Details:
net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:372)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(ReverseEngineeringGeneric.java:141)
com.mysql.grt.modules.ReverseEngineeringMssql.getSchemata(ReverseEngineeringMssql.java:99)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)
I have also attempted to add the MySQL ODBC 5.1 Driver so that I can export the data from SSMS but the driver does not appear in the export wizard's Destination options.
Can someone help me either get the MySQL ODBC Driver to show up in the SSMS export wizard destination options, or get MySQL Migration Tool to connect to the database and grab the data?
Thanks.

Try Data Import tool (ODBC format) in dbForge Studio for MySQL; or Data Export tool (ODBC format) in dbForge Data Studio for SQL Server.

I have used the SQL Examiner Suite. At first it did not work but after some digging found that the SQL being generated contained double-quotes around table names and columns (invalid SQL, basically). It does allow the user to edit the SQL before it is run so I had to go through the ~15 tables and delete the double-quotes around everything. Anywho - it works!!! Yay!

Related

Connection issues with Talend Open Studio for Big data and Couchbase Server

I want to move data from MySQL to Couchbase server using Talend. I have a new installation for Couchbase with the portal having the username Administrator and the password administrator. I also have Xampp installed with data in the data database.
Using Talend, I have setup the MySql connection, set up the credentials and schema and mapped the JSON. For couchbase, here is what I have setup
When I run this job however, I get this error:
WARN com.couchbase.client.vbucket.ConfigurationProviderHTTP: Connection
problems with URI http://127.0.0.1:8091/pools ...skipping
java.io.IOException: Server returned HTTP response code: 401 for URL: http://127.0.0.1:8091/pools
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.couchbase.client.vbucket.ConfigurationProviderHTTP.readToString(ConfigurationProviderHTTP.java:344)
at com.couchbase.client.vbucket.ConfigurationProviderHTTP.readPools(ConfigurationProviderHTTP.java:144)
at com.couchbase.client.vbucket.ConfigurationProviderHTTP.getBucketConfiguration(ConfigurationProviderHTTP.java:126)
at com.couchbase.client.CouchbaseConnectionFactory.getVBucketConfig(CouchbaseConnectionFactory.java:233)
at com.couchbase.client.CouchbaseClient.<init>(CouchbaseClient.java:256)
at com.couchbase.client.CouchbaseClient.<init>(CouchbaseClient.java:222)
at local_project.couchbasedummy_0_1.couchbasedummy.tCouchbaseOutput_1_MidProcess(couchbasedummy.java:1420)
at local_project.couchbasedummy_0_1.couchbasedummy$1ThreadXMLField_tCouchbaseOutput_1_In.run(couchbasedummy.java:619)
Exception in component tCouchbaseOutput_1_Out (couchbasedummy)
java.lang.NullPointerException
.....
.....
What could be the problem?

SQL Server 2016 Fails Cryptically (Error #7303) on Link to MySQL, But Access 2016 Succeeds with Same System DSN

I am going around in crop circles, trying to set up a linked server (from SQL Server 2016 to MySQL).
Here is the basic procedure that I used: Create a Linked Server to MySQL from SQL Server. Upon clicking OK to create the new linked server, I received the following SSMS 2016 spasm, Error #7303:
The linked server has been created but failed a connection test. Do you want to keep the linked server?
Additional information:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "MYSQL".
OLE DB provider "MSDASQL" for linked server "MYSQL" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". (Microsoft SQL Server, Error: 7303)
I tried variations that included a Provider String and Catalog (same error):
I have tried the latest MySQL ODBC ANSI/Unicode drivers (5.03.07.00), set up via System DSNs in both the 32- and 64-bit versions of the ODBC Data Source Administrator.
Now, I suspect that something screwy is going on with MS SQL Server and/or its OLE-DB Provider (MSDASQL), because:
All tests of the System DSNs within the ODBC Data Source
Administrator are successful.
Crippled Access 2016 is able to link (via the aforementioned Unicode System
DSN) to MySQL just fine, with minimal effort, listing all databases
and tables.
What is the magic that SQL Server 2016 needs to make the linked-server dialog not result in the above error?
Two things --
Product Name should be MSDASQL.
Leave Provider String and Catalog blank (these are typically taken care of by your DSN definition).
That should do it...

connecting to a MySQL database from MSSQL Management Studio

Somehow I'm having a lot of trouble establishing an ODBC connection to MySQL from within MSSQL Management Studio. I have 64-bit versions of MSSQL and MySQL ODBC connector installed.
The local MySQL database already has a DSN assigned to it. I've used this DSN with Excel in the past and had no problems.
Now, (in SQL Man. Studio) when I access:
'Tasks' -> 'Import Data' -> '.Net Framework Provider for ODBC'
I get a helpful form asking me to enter all the connection details even though I've already registed the DSN in 'Control Panel\Data Sources'.
So, after a brief 'wait, what?", I enter:
Dsn: My_Dsn
Driver: MySQL ODBC 5.2 ANSI Driver
... and get: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application
#
PS.
I've also tried creating a linked MySQL server in MS Studio like so: http://www.sqlservercentral.com/Forums/Topic340912-146-1.aspx
and get:
'contains no columns that can be selected or the current user
does not have permissions on that object.'
In short: no access to MySQL from within MSSQL Studio whatsoever
Thanks in advance!

How do I access MySQL from CloudBees Jenkins?

I cannot figure out how to access a MySQL database while running in Jenkins CloudBees. I have tried following the Dev#Cloud MySQL, but there are a lot of warnings in the console output and I have to deal with localhost access vs. sockets, which is pretty tricky to debug without a command line.
Is there a way to use the CloudBees MySQL hosting? When I try and use the cloudbees JDBC driver, I get ClassNotFound error messages.
Update: The answer below clarified that I cannot use the CloudBees driver, so I am now using the regular MySQL connector through the c3p0 connection pool. Based on comments below, I have limited the number of connections in the pool to 10.
The exact same configuration and Maven command line works when I run it from my development computer, connecting to the Cloudbees Mysql instance.
Unfortunately, I get this error when trying to connect:
Caused by: com.googlecode.flyway.core.exception.FlywayException: Unable to obtain Jdbc connection from DataSource
at com.googlecode.flyway.core.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56)
at com.googlecode.flyway.core.Flyway.execute(Flyway.java:864)
at com.googlecode.flyway.core.Flyway.migrate(Flyway.java:591)
at com.assuredlabor.db.DatabaseMigrator.migrate(DatabaseMigrator.java:13)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 62 more
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
at com.googlecode.flyway.core.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50)
... 72 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
... 74 more
Any ideas would be appreciated.
You can't use CloudBees JDBC driver from outside the RUN#Cloud container, but you can use a standard MySQL JDBC driver with your RUN database using the host name and port that you can find on RUN#Cloud web console for your DB resource.

Data Migration from SQL Serever Express 2008 R2 to MySQL 5

I am trying to copy a database from SQL Server 2008 Express to MySQL using the MYSQL Migration Toolkit on Windows and keep getting the following connection error.
Connecting to source database and retrieve schemata names.
Initializing JDBC driver ...
Driver class MS SQL JDBC Driver
Opening connection ...
Connection jdbc:jtds:sqlserver://localhost:1433/ePacro2.0;user=sa;password=xxxxxx;charset=utf-8;domain=
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringMssql.getSchemata :Network error IOException: Connection refused: connect
Details:
net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:372)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:178)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(ReverseEngineeringGeneric.java:141)
com.mysql.grt.modules.ReverseEngineeringMssql.getSchemata(ReverseEngineeringMssql.java:99)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.mysql.grt.Grt.callModuleFunction(Unknown Source)
Would you have any idea why this is failing?
I've also tried to export from SQL express 2008 but it won't let me choos a MySQL ODBC connector for my destination.
Having ODBC driver for MS SQL server database, you could try Data Import tool in dbForge Studio for MySQL.