Thursday, 2 December 2010

SQL Server and Sybase Browsing

SQL Developer 3.0 (EA3) makes it easier to browse your SQL Server and Sybase servers.

All databases on your server are now available under the one connection, not just the default databases selected in the new connection dialog.

As long as your login has the privileges you can browse the objects in databases other than your default database.







When it comes to issuing commands/queries in the worksheet you can reference objects outside of the default database explicitly
SELECT * FROM databasename.owner.table1

or you can change the default database using a worksheet "hint"
/*sqldev:stmt*/USE databasename;
SELECT * FROM table1

or you can choose the default databases in the navigator


Note that the default is set for the life of the session only. If you want to change the default database permanently you can do this in the New Connection Dialog. Just right click the connection and choose Properties. Then click "Retrieve Databases", choose the default databases and click save.







Another nice feature is the Schema Browser, which makes working on one database/owners objects much neater.