Ryan Atwood
Ryan Atwood

Reputation: 152

Can I set a default schema for a connection in Oracle sql developer 4?

Is there a way to set the default schema for a Database connection in Oracle SQL Developer version 4+? I see this link for previous versions: http://www.javaforge.com/project/schemasel

...but I can't figure it out for Oracle SQL Developer version 4.

Upvotes: 3

Views: 9631

Answers (1)

Naveen Katragadda
Naveen Katragadda

Reputation: 79

The way to do this at the tool level would be to run a session startup script.

  1. Create a text file 'logon.sql' with the script "alter session set current_schema = yourschema;"

  2. Save it anywhere - I recommend saving it somewhere in your database install location.

  3. In SQL Developer go to Tools -> Preferences -> Database Check the box for "Run connection startup script on each new database connection"

  4. Browse and select the above file.

That should make you default to that schema every time you login.

Upvotes: 7

Related Questions