[This topic is migrated from our old forums. The original author name has been removed]
When I connect to MSSQL server (via sqljdbc or jTDS) I can see all the databases, and all their tables, views, etc
however in the SQL Commander the database dropdown only lists master.
If I use the following query, it works:
USE mydb;
SELECT * FROM mytable
Hi,
Are you sure that the Database Connection list selection in the SQL Commander matches the connection you are looking at in the tree? If so, please open Tools->Debug Window and enable debugging for DbVisualizer. Then connect to the database and open an SQL Commander tab and include the debug output in your reply.
Best Regards,
Hans
a
anonymous
said
almost 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Database dropdown empty in SQL Commander
The database connection selection is the same as the tree I am looking at.
I have enabled the debug and captured the information:
2015-11-12 08:43:13.685 FINE 160 [ExecutorRunner-pool-2-thread-26 - I.ᅣᄋ] Connecting root connection for: MSSQL Dev
*** Database Properties ****************************
Alias: MSSQL Dev
Settings Format: Server Info
URL: jdbc:jtds:sqlserver://devmachine:1433
Driver: SQL Server (jTDS)
Userid: sa
Preferred Database Type: sqlserver
Current Database Type: sqlserver
Preferred Profile: auto
Current Profile: null (not connected?)
--- Object Type Settings ---------------------------
None
--- Overridden User Properties ---------------------
sqlserver.ConnectionModeMigrated = true
sqlserver.SQLCommanderMostRecentCatalog = migratedb
sqlserver.SQLCommanderMostRecentSchema = dbo
--- Overridden Driver Properties -------------------
None
*** End Database Properties ************************
*** Driver Information *****************************
Name: SQL Server (jTDS)
DefaultDriver: true
DefaultClass: net.sourceforge.jtds.jdbc.Driver
Paths:
Path: /Applications/DbVisualizer.app/Contents/java/app/jdbc/jtds/jtds.jar
Type: dynamic
Class: net.sourceforge.jtds.jdbc.Driver
*** End Driver Information *************************
*** Current Connection Message *********************
Connecting. Wait...
*** End Current Connection Message *****************
2015-11-12 08:43:13.686 FINE 160 [ExecutorRunner-pool-2-thread-26 - G.ᅣᄋ] Connecting: MSSQL Dev
2015-11-12 08:43:13.703 FINE 160 [ExecutorRunner-pool-2-thread-26 - L.ᅣチ] Loading class using dynamic ClassLoader: net.sourceforge.jtds.jdbc.Driver
2015-11-12 08:43:13.703 FINE 160 [ExecutorRunner-pool-2-thread-26 - L.ᅣチ] Loading class using dynamic ClassLoader: net.sourceforge.jtds.jdbc.Driver
2015-11-12 08:43:13.703 FINE 160 [pool-3-thread-28 - D.ᅣチ] RootConnection: Driver.acceptsURL("jdbc:jtds:sqlserver://devmachine:1433")
2015-11-12 08:43:13.704 FINE 160 [pool-3-thread-28 - D.ᅣチ] RootConnection: Driver.connect("jdbc:jtds:sqlserver://devmachine:1433", {user=**, password=********})
2015-11-12 08:43:13.708 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.supportsTransactions()
2015-11-12 08:43:13.709 FINE 160 [pool-3-thread-28 - C.ᅣチ] RootConnection: ConnectionJDBC3.setAutoCommit(true)
2015-11-12 08:43:13.711 FINE 160 [ExecutorRunner-pool-2-thread-26 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getSearchStringEscape()
2015-11-12 08:43:13.711 FINE 160 [ExecutorRunner-pool-2-thread-26 - G.ᅣヌ] Using facade: sqlserver for: MSSQL Dev
2015-11-12 08:43:13.711 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getUserName()
2015-11-12 08:43:13.712 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDatabaseMajorVersion()
2015-11-12 08:43:13.712 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.getColumn] Executing 'SELECT default_schema_name FROM sys.database_principals WHERE name = User_Name()' for: MSSQL Dev
2015-11-12 08:43:13.713 FINE 160 [pool-3-thread-28 - C.ᅣチ] RootConnection: ConnectionJDBC3.createStatement()
2015-11-12 08:43:13.713 FINE 160 [pool-3-thread-28 - B.ᅣチ] RootConnection: JtdsStatement.executeQuery("SELECT default_schema_name FROM sys.database_principals WHERE name = User_Name()")
2015-11-12 08:43:13.714 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDatabaseProductName()
2015-11-12 08:43:13.714 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDatabaseProductVersion()
2015-11-12 08:43:13.714 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDriverName()
2015-11-12 08:43:13.714 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDriverVersion()
2015-11-12 08:43:13.714 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDriverName()
2015-11-12 08:43:13.714 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDriverVersion()
2015-11-12 08:43:13.738 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣᆭ] Loading profile /Applications/DbVisualizer.app/Contents/java/app/resources/profiles/sqlserver.xml
2015-11-12 08:43:13.744 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣᆭ] Loading profile /Applications/DbVisualizer.app/Contents/java/app/resources/profiles/generic.xml
2015-11-12 08:43:13.744 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣツ] Merging: /Applications/DbVisualizer.app/Contents/java/app/resources/profiles/sqlserver.xml with: generic
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getTableNamesFor']
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getColumnNamesFor']
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getObjects']
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getIndexes']
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getTriggers']
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getTableTriggers']
2015-11-12 08:43:13.746 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getSequences']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getSynonyms']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getUsers']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getRoles']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getRoleMembers']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getUserTypes']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getLogins']
2015-11-12 08:43:13.747 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getLoginDatabases']
2015-11-12 08:43:13.748 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getLoginRoles']
2015-11-12 08:43:13.749 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getServerRoles']
2015-11-12 08:43:13.749 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getServerRoleMembers']
2015-11-12 08:43:13.749 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getDevices']
2015-11-12 08:43:13.749 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getDeviceDatabases']
2015-11-12 08:43:13.749 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.serverInfo']
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getRemoteServers']
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getCaches']
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getProcesses']
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: Commands/Command[@id='sqlserver.getLocks']
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Replacing all of with in: /Applications/DbVisualizer.app/Contents/java/app/resources/profiles/sqlserver.xml
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Replacing all of with in: /Applications/DbVisualizer.app/Contents/java/app/resources/profiles/sqlserver.xml
2015-11-12 08:43:13.750 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: type="Catalog" for: ObjectsViewDef/ObjectView[@type='Catalog']
2015-11-12 08:43:13.751 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Catalog']/DataView[@id='generic-catalog-tables']
2015-11-12 08:43:13.751 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Catalog']/DataView[@id='generic-catalog-references']
2015-11-12 08:43:13.751 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: type="Tables" for: ObjectsViewDef/ObjectView[@type='Tables']
2015-11-12 08:43:13.751 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Tables']/DataView[@id='generic-tables-tables']
2015-11-12 08:43:13.751 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Tables']/DataView[@id='generic-tables-references']
2015-11-12 08:43:13.751 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Tables']/DataView[@id='sqlserver-tables-tables']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Tables']/DataView[@id='sqlserver-tables-references']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: type="Table" for: ObjectsViewDef/ObjectView[@type='Table']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: id="generic-table-ddl" for: ObjectsViewDef/ObjectView[@type='Table']/DataView[@id='generic-table-ddl']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Table']/DataView[@id='sqlserver-table-triggers']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='SystemTables']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='SystemTable']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Views']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='View']
2015-11-12 08:43:13.752 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: type="Indexes" for: ObjectsViewDef/ObjectView[@type='Indexes']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Indexes']/DataView[@id='generic-indexes-indexes']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Indexes']/DataView[@id='sqlserver-indexes-indexes']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Sequences']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Sequence']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Synonyms']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Synonym']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Users']
2015-11-12 08:43:13.753 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Roles']
2015-11-12 08:43:13.754 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Role']
2015-11-12 08:43:13.754 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Triggers']
2015-11-12 08:43:13.754 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Trigger']
2015-11-12 08:43:13.754 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Types']
2015-11-12 08:43:13.754 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: type="Procedures" for: ObjectsViewDef/ObjectView[@type='Procedures']
2015-11-12 08:43:13.754 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Procedures']/DataView[@id='generic-procedures-procedures']
2015-11-12 08:43:13.755 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Procedures']/DataView[@id='sqlserver-procedures-procedures']
2015-11-12 08:43:13.755 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Setting attribute: type="Procedure" for: ObjectsViewDef/ObjectView[@type='Procedure']
2015-11-12 08:43:13.755 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Removing: ObjectsViewDef/ObjectView[@type='Procedure']/DataView[@id='generic-procedure-columns']
2015-11-12 08:43:13.755 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Procedure']/DataView[@id='sqlserver-procedure-procedureeditor']
2015-11-12 08:43:13.756 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Procedure']/DataView[@id='sqlserver-procedure-interface']
2015-11-12 08:43:13.756 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Functions']
2015-11-12 08:43:13.756 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Function']
2015-11-12 08:43:13.756 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='ServerInfo']
2015-11-12 08:43:13.756 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Logins']
2015-11-12 08:43:13.756 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Devices']
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='RemoteServers']
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='ServerRoles']
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='ServerRole']
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Processes']
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣチ] Adding: ObjectsViewDef/ObjectView[@type='Locks']
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣツ] Setting attribute: desc="Profile for SQL Server" for: DatabaseProfile
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣツ] Setting attribute: version="$Revision: 19541 $" for: DatabaseProfile
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣツ] Setting attribute: date="$Date: 2015-10-20 11:02:55 +0200 (Tue, 20 Oct 2015) $" for: DatabaseProfile
2015-11-12 08:43:13.757 FINE 160 [ExecutorRunner-pool-2-thread-26 - P.ᅣツ] Setting attribute: minver="9.2" for: DatabaseProfile
2015-11-12 08:43:13.784 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#db.getDatabaseMajorVersion() gte 9"
2015-11-12 08:43:13.786 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: Else "null"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#db.getDatabaseMajorVersion() gte 9"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: Else "null"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#db.getDatabaseMajorVersion() gte 9"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: Else "null"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#db.getDatabaseMajorVersion() gte 9"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: Else "null"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#db.getDatabaseMajorVersion() gte 9"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: Else "null"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#sp.getProperty('dbvis.license.type') in {'Personal', 'Pro'}"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: If "#db.getDatabaseType().equals('informix')"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#sp.getProperty('dbvis.license.type') in {'Personal', 'Pro'}"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] match: If "#db.getDatabaseMajorVersion() gte 9"
2015-11-12 08:43:13.787 FINE 160 [ExecutorRunner-pool-2-thread-26 - D.ᅣツ] no match: If "#db.getDatabaseMajorVersion() gte 11"
2015-11-12 08:43:13.791 FINE 160 [ExecutorRunner-pool-2-thread-26 - A.ᅣツ] Profile merging and post processing: 0.053 secs
2015-11-12 08:43:13.791 FINE 160 [ExecutorRunner-pool-2-thread-26 - L.ᅣᆭ] Using profile: sqlserver
2015-11-12 08:43:13.792 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getDatabaseMinorVersion()
2015-11-12 08:43:13.793 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.runConnectionSetup] Caching data from database: MSSQL Dev...
2015-11-12 08:43:13.793 FINE 160 [ExecutorRunner-pool-2-thread-26 - B.execute] Execute Command: getCatalogs
2015-11-12 08:43:13.793 FINE 160 [ExecutorRunner-pool-2-thread-26 - O.ᅣリ] getCatalogs() for: MSSQL Dev
2015-11-12 08:43:13.794 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getCatalogs()
2015-11-12 08:43:13.811 FINE 160 [ExecutorRunner-pool-2-thread-26 - Z.processResultSet] Fetched Rows: 20 Columns: 1 Exec: 0.001 Fetch: 0.000 sec
2015-11-12 08:43:13.812 FINE 160 [ExecutorRunner-pool-2-thread-26 - _.ᅣチ] Adding filter for [TABLE_CAT [TABLE_CAT] equal master] to column: 0
2015-11-12 08:43:13.824 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.runConnectionSetup] 1 catalog names cached
2015-11-12 08:43:13.824 FINE 160 [ExecutorRunner-pool-2-thread-26 - B.execute] Execute Command: getSchemaNames
2015-11-12 08:43:13.826 FINE 160 [ExecutorRunner-pool-2-thread-26 - O.ᅣヤ] getSchema() for: MSSQL Dev
2015-11-12 08:43:13.826 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getSchemas()
2015-11-12 08:43:13.827 FINE 160 [ExecutorRunner-pool-2-thread-26 - Z.processResultSet] Fetched Rows: 15 Columns: 2 Exec: 0.001 Fetch: 0.000 sec
2015-11-12 08:43:13.829 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.runConnectionSetup] 15 schema names cached
2015-11-12 08:43:13.829 FINE 160 [ExecutorRunner-pool-2-thread-26 - O.ᅣヨ] getTypeInfo() for: MSSQL Dev
2015-11-12 08:43:13.829 FINE 160 [pool-3-thread-28 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getTypeInfo()
2015-11-12 08:43:13.832 FINE 160 [ExecutorRunner-pool-2-thread-26 - Z.processResultSet] Fetched Rows: 37 Columns: 18 Exec: 0.003 Fetch: 0.000 sec
2015-11-12 08:43:13.832 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.runConnectionSetup] 37 data types cached
2015-11-12 08:43:13.832 FINE 160 [ExecutorRunner-pool-2-thread-26 - J.execute] Executing...
2015-11-12 08:43:13.832 FINE 160 [pool-3-thread-28 - C.ᅣチ] RootConnection: ConnectionJDBC3.createStatement()
2015-11-12 08:43:13.832 FINE 160 [pool-3-thread-28 - B.ᅣチ] RootConnection: JtdsStatement.execute("select name from fn_helpcollations()")
2015-11-12 08:43:13.843 FINE 160 [ExecutorRunner-pool-2-thread-26 - Z.processResultSet] Fetched Rows: 2397 Columns: 1 Exec: 0.002 Fetch: 0.009 sec
2015-11-12 08:43:13.844 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.runConnectionSetup] 2398 collations cached
2015-11-12 08:43:13.845 FINE 160 [ExecutorRunner-pool-2-thread-26 - AbstractFacade.runConnectionSetup] 'null' storage areas cached
2015-11-12 08:43:13.963 FINE 160 [AWT-EventQueue-0 - P.getChildCount] getChildCount() for: MSSQL Dev in background
2015-11-12 08:43:13.964 FINE 160 [ExecutorRunner-pool-2-thread-26 - K.ᅣチ] elementName: 'GroupNode' label: 'Databases' type: 'Databases' on-empty-output: 'stop'
2015-11-12 08:43:13.964 FINE 160 [ExecutorRunner-pool-2-thread-26 - K.ᅣチ] elementName: 'GroupNode' label: 'DBA Views' type: 'DBA' on-empty-output: 'stop'
Then after I expand the tree the following is the output:
2015-11-12 08:45:21.277 FINE 160 [AWT-EventQueue-0 - P.getChildCount] getChildCount() for: MSSQL Dev/Databases in background
2015-11-12 08:45:21.278 FINE 160 [ExecutorRunner-pool-2-thread-27 - K.ᅣチ] elementName: 'DataNode' label: '${getCatalogs.TABLE_CAT}' type: 'Catalog' on-empty-output: 'stop'
2015-11-12 08:45:21.332 FINE 160 [ExecutorRunner-pool-2-thread-27 - B.execute] Execute Command: getCatalogs
2015-11-12 08:45:21.332 FINE 160 [ExecutorRunner-pool-2-thread-27 - O.ᅣリ] getCatalogs() for: MSSQL Dev
2015-11-12 08:45:21.332 FINE 160 [pool-3-thread-30 - E.ᅣチ] RootConnection: JtdsDatabaseMetaData.getCatalogs()
2015-11-12 08:45:21.334 FINE 160 [ExecutorRunner-pool-2-thread-27 - Z.processResultSet] Fetched Rows: 20 Columns: 1 Exec: 0.002 Fetch: 0.000 sec
a
anonymous
said
almost 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Database dropdown empty in SQL Commander
Do you use two different queries to show the database the user has access to?
If you can share those queries I can run them and get back to the results.
This may not be a DbVisualizer error, and more of some roles/privileges/access issue with my databases
Hans Bergsten
said
almost 9 years ago
[This reply is migrated from our old forums.]
Re: Database dropdown empty in SQL Commander
The SQL Commander list uses the values cached at connect, so there is only one way they are retrieved. For SQL Server, they are retrieved using the JDBC DatabaseMetaData#getCatalogs() method.
The log shows that it caches 20 database/catalog names, so I'm stumped as to why you don't see them in the SQL Commander. Do you have the SQL Commander open when you connect/expand the tree or do you open a new SQL Commander tab after you are connected? What happens if you select another connection in the Database Connection list and then select the original one again?
If you can share a screencast or screenshots, maybe we can figure this out. Also, make sure you are using the latest DbVisualizer version, 9.2.12 as of now. Use Help->Check for Update to upgrade or ensure you are using the latest version.
Best Regards,
Hans
a
anonymous
said
almost 9 years ago
[This reply is migrated from our old forums. The original author name has been removed] [Attachment has been removed.]
Re: Database dropdown empty in SQL Commander
I did a test application in java and JDBC, and can confirm that JDBC DatabaseMetaData#getCatalogs() does return the correct number of databases, which I can see in the tree on the left side of DBViz.
Attached are some screenshots which you have requested, for MS-SQL server I use the username 'sa' to connect to the server:
*01* This shows that I have the updated version of DBViz
*02* This shows that I made a connection to MySQL server, and it correctly displays the database list under the tree and the SQL commander
*03* This shows that I made a connection to a MS-SQL server (the one with the problem), and though the tree shows the correct list of databases, the SQL commander only shows master database
*04* This shows that I made a connection to a MS-SQL server (the one without any problem), and the tree and SQL commander both show the correct databases.
The problem is only with one instance of SQL server. All was working fine until one day I made some changes at the server which caused this problem. All the databases on this server are either restored from another server or attached from other servers. I had some problems in attaching the database (some file permissions for the data files under windows), I changed owners of the files to the local user.
I am pretty sure there is some problem in my database, even though I can connect, run queries, and do all the stuff, only DBViz is not showing the database list under SQL Commander.
If I use the USE dbname query, then DBViz adds the dbname to the list, and if I open more SQL Commanders all of them will have that dbname in the list. When I close all the SQL Commanders then, I only see master in the list.
Another scenario, no SQL commander is open:
1. Open SQL Commander (1: untitled)
2. USE dbname1
3. (1: untitled) tab database list has master and dbname1 in the list)
4. Open another SQL Commander (2: untitled)
5. USE dbname2
6. (2: untitled) tab database list has master, dbname1 and dbname2 in the list)
7. Select (1: untitled) tab
8. Open a new SQL Commander (3: untitled)
9. (3: untitled) tab database list has master and dbname1 in the list)
10. Select (2: untitled) tab
11. Open a new SQL Commander (4: untitled)
12. (4: untitled) tab database list has master and dbname2 in the list)
13. Select (2: untitled) tab
14. Select dbname1 from the database list
15. Open a new SQL Commander (5: untitled)
16. (5: untitled) tab database list has master and dbname1 in the list)
Hans Bergsten
said
almost 9 years ago
[This reply is migrated from our old forums.]
Re: Database dropdown empty in SQL Commander
Hi,
Thanks for the additional info.
I believe there's something odd going on with filters for this connection. Connect to the database and select the connection node. Then click on the Filter menu icon in the Databases tab toolbar and select Disable Filtering. Reconnect and then open an SQL Commander tab. Does it now list all databases in the drop-down?
Best Regards,
Hans
a
anonymous
said
almost 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Database dropdown empty in SQL Commander
I tried your suggestion and successfully the commander lists down all the databases, thanks for the help.
Next thing I tried was enabling filter again (even though I have not defined any filters) and reconnect, still commander is showing the correct databases.
So I have no idea what happened at the backend :)
I will keep any eye out if this problem pops up again.
Hans Bergsten
said
almost 9 years ago
[This reply is migrated from our old forums.]
Re: Database dropdown empty in SQL Commander
Hi,
Great to hear that it solved the problem. I also cannot explain what happened, but some filter setting was likely corrupted.
Best Regards,
Hans
anonymous