WinSQL » Knowledge base

Document information

Document ID:1906
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.

Prerequisite

You must be using WinSQL Oracle Wire Protocol driver for this to work

Steps

  • 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? Please add it below. Your name and tip will appear at the end of the document text.
Your name:
Your email:
Hide my email address
Verification code:
Enter the verification code you see above more submitting your tip
Tip:Please limit tips to 1000 characters

Navigation

Social Media

Powered by 10MinutesWeb.com