This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
DB structure and schema isn't available for connection to microsoft sql server. Tried to setup a connection, I have psb database I can see a table dbo.Persons inside the database, I have a connection with usage of Microsoft JDBC Driver 4.0 for SQL Server. My connection url is jdbc:sqlserver://localhost\SQLEXPRESS:1155;databaseName=psb;integratedSecurity=true I can see master, model, msdb, psb, tempdb nodes, but no one contain any content. On other side I can succesfully execute sql command "select * from dbo.Persons" on the connection. I'm not completely sure it's not user error as microsoft sql server setup is new for me.
Also if I select the connection in Persistence|Database Schema I see no tables.
Server is Microsoft SQL Server 2008
Please attach message log, it could be useful...
Created attachment 118725 [details] fresh message.log it's fresh build, register driver and connection with sql authorization in this session and try to expand databases. No exceptions and no result.
Created attachment 118726 [details] screen for conneciton node On top is derby node successfully expanded and below is sqlsever node without ability to expand more
You could try to verify the database permissions by connecting to the database with the administration tool from microsoft (enforce use of tcp as connection method and use the same account). I tested today against a 2008 server and got a correct listing of all databases and for my target also a table listing.
Yes, I see tables if connect with SQL Server Management Studio in both modes - Windows authentication and sql server authentication (with same sa account as on screenshot) And don't see from nb in both modes. Also sa is set as owner of one of tables. have you tried the same jdbc? i.e.sqljdbc4.jar from Microsoft JDBC Driver 4.0 for SQL Server ?
tried "Microsoft SQL Server JDBC Driver 3.0 with JRE7 getDate compatibility" and I can see schemas/tables now, but microsoft recommend Driver 4.0 on 3.0 driver page.
Created attachment 118898 [details] proposed patch Ah! They changed the driver name and so the MSSQL specific driver model was not applied. Please see attached patch for more information. Old check: driverName.contains("Microsoft SQL Server") || driverName.contains("jTDS") Driver name 3.0: Microsoft SQL Server JDBC Driver 3.0 Driver name 4.0: Microsoft JDBC Driver 4.0 for SQL Server The patch checks presence of "Microsoft" and "SQL Service" matching both variant.
(In reply to comment #9) > Created attachment 118898 [details] > proposed patch > > Ah! They changed the driver name and so the MSSQL specific driver model was not > applied. Please see attached patch for more information. > > Old check: > driverName.contains("Microsoft SQL Server") || driverName.contains("jTDS") Nice hint. Thanks. Honzo, could you apply it and ask Sergey for verification? Thank you > > Driver name 3.0: Microsoft SQL Server JDBC Driver 3.0 > Driver name 4.0: Microsoft JDBC Driver 4.0 for SQL Server > > The patch checks presence of "Microsoft" and "SQL Service" matching both > variant.
Thank you, Matthias. Applied as http://hg.netbeans.org/core-main/rev/89655183182d. Sergey, can you please verify this fix?
Integrated into 'main-golden', will be available in build *201205150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/89655183182d User: Jaroslav Havlin <jhavlin@netbeans.org> Log: #211632 - DB structure isn't available for connection to MS SQL using SQLServerDriver, ver.4
v4 works for me now