Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set file in directory for sqlplus 1

Status
Not open for further replies.

Ron06

Technical User
Sep 27, 2007
11
US
I have scripts files in oracle/home/scripts how to set this directory path in sqlplus in order to get files and execute from this directory.

Thanks in advance
 
Ron,

The sqlplus working directory is set when it is first invoked.
If you wish to invoke sqlplus files in other directories, from within sqlplus, then you must provide the relative path from the working directory to the target directory.

Regards

Tharg

Grinding away at things Oracular
 
So, Ron, to clarify the context of dbtoo's excellent reference, from your Unix prompt (or in your Oracle user's profile) you will want to create a Unix logical variable (with syntax similar to):
Code:
% SQLPATH=<the path you wish to use for scripts>
% export SQLPATH
You can confirm the correct content with:
Code:
% echo $SQLPATH
Let us know of your success with this.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
thanks all for your input
 
Thanks Dave it works. Now second hurdle I have connecting different schema users like user, hr,payroll. How to connect different users using varible when running upgrade script on oracle instance in sh script instead of using connect user/user with every connection

Thanks in advance
Ron
 
Ron,

Since your newest question deals with a totally different issue from your first question, it is probably best (for subsequent readers that are looking for answers to questions similar to your newest issue) to post a separate question here in the Oracle forum.

When you do, please clarify, with a sample scenario, exactly what you are looking for (since I'm not certain myself what you want in your question, above). Are you saying that you have an upgrade script that needs to run (possible unattended) for multiple users?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top