I am writing a bacth file which is as below.
SVRMGRL
CONNECT internal/oracle@aaaa
select * from v$database
But as soon as SVRMGRL it doesn't type the next command
How to reslove this..?
Please help
Thanks
Harry
Printable View
I am writing a bacth file which is as below.
SVRMGRL
CONNECT internal/oracle@aaaa
select * from v$database
But as soon as SVRMGRL it doesn't type the next command
How to reslove this..?
Please help
Thanks
Harry
In windows you have to do the foll to run a batch file:
put all the commands starting from connect internal into a sql script for eg: data.sql:
connect internal
select * from v$datafile;
exit;
and then run another batch script like :
%ORACLE_HOME%/bin/svrmgrl @data.sql
I think this will work.
I couldn't understand this
How can I define the sql script to run in SVRMGRL.
Explain in detail.
Thanks
Harry
Hi
You have to make two bacth files.
1. startup.bat
---------------
svrmgrl @s.sql
2. s.sql
----------------
connect internal
Then when ever you run the startup.bat, the the file s.sql will be executed. Try it..!
Thomas
My advice is " not to use svrmgrl and connect internal", since these commands are deprciated in Oracle9i, so use sqlplus which will make your script compatible to new Oracle version also.
If you are using Unix.
try
sqlplus <connect scott/tiger@instance
select * from dept;
EOF
Sanjay
Hi,
u can try scheduler on NT. an execute the sql command file as below
sqlplus internal file.sql
this works if u r using od authenticatio otherwise
sqlplus user/pwd file.sql
vijay