WinSQL » Knowledge base
|Subject:||Setting default schema in Oracle|
|Creation date:||11/30/11 9:56 AM|
|Last modified on:||11/30/11 10:09 AM|
Setting default schema in Oracle
Often it is helpful to assign a value for default schema you want to use when connecting to Oracle. This can be accomplished by writing the following query:
ALTER SESSION SET CURRENT_SCHEMA = 'XXXXX'
It is a bit tedious if you have to do this repeatedly when connecting to Oracle. A better approach is to set this statement in the DSN that is used to connect to the back-end. The ODBC driver will automatically run the script right after connection is established.
You must be using WinSQL Oracle Wire Protocol
driver for this to work
- Start WinSQL
- Click ODBC Mgr. button
- Locate the DSN for Oracle, select it and click Configure... button
- Select the Advanced tab
- Paste the SQL script to set default schema here. See image below
- Click OK all the way
Add a comment to this document
Do you have a helpful tip related to this document that you'd like to share
with other users?
This area is reserved for useful tips. Therefore, do not post any questions here. Instead, use our public forums
to post questions.