Kin Fat SZE
asked on
setting command path of sqlplus
Experts,
I created a .sql (showtables.sql) at C:\oraclexe\command. Well, if I start sqlplus from that directory and run @showtables It fine...
But, one problem is comming..... How could I set command path of sqlplus, so that I could run @showtables by sqlplus from anydirectory?
Please have a look of code snippet...
note : if anyone could give me fully detail what should I do.... I must given max points on the question.
I created a .sql (showtables.sql) at C:\oraclexe\command. Well, if I start sqlplus from that directory and run @showtables It fine...
But, one problem is comming..... How could I set command path of sqlplus, so that I could run @showtables by sqlplus from anydirectory?
Please have a look of code snippet...
note : if anyone could give me fully detail what should I do.... I must given max points on the question.
C:\oraclexe\command>sqlplus test/test007
SQL> @showtables;
OWNER TABLE_NAME
---------- --------------------
TEST TEST2_SQL
TEST TEST22
TEST TESTDATE
TEST T1
TEST TEST_NUMBERS
TEST CUSTOMERS
TEST TEST
TEST GROUPS
TEST PRODUCTS
TEST T
C:\>sqlplus test/test007
SQL> @showtables;
SP2-0310: !Õ‹_”H "showtables.sql"
@C:\oraclexe\command\showt ables.sql
ASKER
no, I would like to just run @showtables by sqlplus from any directory (path)
file at C:\oraclexe\command>
but run it from c:\
C:\>sqlplus test/test007
SQL> @showtables;
possible?
file at C:\oraclexe\command>
but run it from c:\
C:\>sqlplus test/test007
SQL> @showtables;
possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, that's what I am looking for, thanks
Well if you run the sqlplus command in a command prompt then you can run it from anywhere. I tell you how to do this below.
Unfortunately you can't set a path enviornment in sqlplus. But for some other sqlplus environment settings look here: http://www.orafaq.com/wiki/SQL*Plus_FAQ
Right click on my computer, go to advanced tab.
click environment variables button and new.
type in showtables for variable name
type in full path to showtables in variable value, and use quotes if there is any odd characters.
IE: "C:\oraclexe\command\showt ables.sql"
click ok
open a command prompt and type sqlplus "test/test007" @showtables [ENTER]
and it should run just fine.
Unfortunately you can't set a path enviornment in sqlplus. But for some other sqlplus environment settings look here: http://www.orafaq.com/wiki/SQL*Plus_FAQ
Right click on my computer, go to advanced tab.
click environment variables button and new.
type in showtables for variable name
type in full path to showtables in variable value, and use quotes if there is any odd characters.
IE: "C:\oraclexe\command\showt
click ok
open a command prompt and type sqlplus "test/test007" @showtables [ENTER]
and it should run just fine.