This content has been marked as final. Show 15 replies
Give the complete path to the place where sqlplus utility is present
Hello,1 person found this helpful
check the PATH variable. Make sure your ORACLE_HOME\bin is correctly there. Also check your ORACLE_HOME.
tho check that, simply type on a cmd:
as your environment is on windows, you should check the environment variables, by issuing the command : set
from command prompt.
You can share the result here.
most probably, the sqlplus path is not there, so you should add it with the correct path (where you can successfully run it).
Below is the value of oracle_home.
Also, in the enviornment variables (my computer >(right click) properties > advance > enviornment variables), the values of oracle_base, oracle_home, oracle_sid is already defined
the oracle home is on c: and I need to execute the batch script from d: drive.
Before running the sqlplus set $ORACLE_HOME and $ORACLE_SID and also see whether sqlplus is there in $ORACLE_HOME/bin
sqlplus is there in the c:\oracle\ora92\bin directory.
how to set the oracle enviornment in the batch script ? so that it can found the sqlplus and open the sqlplus prompt.
Edited by: 843027 on Mar 18, 2011 12:15 AM
set $ORACLE_HOME=path of oracle home
now run sqlplus and share the error with us
or go to the path using cd $ORACLE_HOME/bin and run the sqlplus utility
Edited by: Sunny kichloo on Mar 18, 2011 12:40 AM
If you want to run SQLPLUS directly from your command prompt, you need to have the windows environment variable PATH including the right location of the Oracle binaries.
So, you need to do the following:
The above command will be active for your session only. If you want it permanent, you need to add "c:\oracle\ora92\bin" in your windows environment variable.
Edited by: Thierry H. on Mar 18, 2011 8:41 AM
I have added below in the batch script
but showing as could not open the sql file on that location.
SQL*Plus: Release 22.214.171.124.0 - Production on Fri Mar 18 14:12:27 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Oracle9i Release 126.96.36.199.0 - Production
JServer Release 188.8.131.52.0 - Production
SP2-0310: unable to open file "c:\oracle\ora92\bin;d:\temp\script_file.sql"
Well... first part is solved since you can execute SQLPLUS.1 person found this helpful
What is the command line you are running?
SP2-0310: unable to open file "c:\oracle\ora92\bin;d:\temp\script_file.sql"That does not look like a valid path+file name at all.
Did you try:
sqlplus <username>/<password>@<db_sid> @d:\temp\script_file.sql
Update the script and add
sqlplus uname/pwd@str @d:\temp\script_file.sql
after then initiate sqlplus.
set oracle_home=oracle home path
its not $ORACLE_HOME or ORACLE_SID... ;)