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.
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.
Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
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
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?
Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.