Bug #16490 The list of schema names could not be retrieved (error: 0).
Submitted: 13 Jan 2006 18:58 Modified: 17 Jan 2006 14:31
Reporter: David Anderson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S1 (Critical)
Version:1.0.21 rc OS:Windows (XP)
Assigned to: CPU Architecture:Any

[13 Jan 2006 18:58] David Anderson
Description:
Connecting to source database and retrieve schemata names.
Initializing JDBC driver ... 
Driver class MS SQL JDBC Driver
Opening connection ... 
Connection jdbc:jtds:sqlserver://bsc1sqlcom01:1433/Recruiting_Listserv;user=Recruiter;password=xxx
The list of schema names could not be retrieved (error: 0).
ReverseEngineeringMssql.getSchemata :Cannot open database requested in login 'Recruiting_Listserv'. Login fails.
Details: 
net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:591)
net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:335)
net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:188)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringGeneric.establishConnection(Unknown Source)
com.mysql.grt.modules.ReverseEngineeringMssql.getSchemata(Unknown Source)
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)

How to repeat:
I have two identical databases with identical connection strings on servers with identical versions of SQL Server 2000. I can successfully migrate one database that is located on drive C but cannot migrate the other database that is on drive E. This is the only difference in the configurations that I can discern.
[14 Jan 2006 9:39] Valeriy Kravchuk
Thank you for a problem report. Looks like a problem in JDBC driver you used to access MS SQL Server. Can you, please, try to install and use any other driver?
[16 Jan 2006 18:12] David Anderson
1. I downloaded this driver: mysql-connector-java-3.1.12
2. I placed it in this location: C:\Program Files\MySQL
3. After that, I changed the CLASSPATH as follows: C:\Program Files\MySQL\mysql-connector-java-3.1.12\mysql-connector-java-3.1.12-bin.jar
4. After rebooting, I tried the migration tool again and received the exact same error.
[17 Jan 2006 10:38] Valeriy Kravchuk
Please, reread my lmessage carefully:

"Thank you for a problem report. Looks like a problem in JDBC driver you used to
access MS SQL Server. Can you, please, try to install and use any other driver?"

Is there any word about MySQL in it? No, I asked you to use another driver for Microsoft SQL Server. Look at your trace - mysql is not mentioned in it. The exception is from MS JDBC driver...

So, please, try to repeat with another JDBC driver for Microsoft SQL Server.
[17 Jan 2006 14:31] David Anderson
The issue didn't have anything to do with the JDBC driver. Even though the two databases used the same username and password, the one that didn't work was using improper permissions for the user. The schema could not be retrieved because the user could not log in. This did not become apparent until I used a different software tool with more informative error messages.