-
Connect DB in a windows script
Hello all,
I want to connect to oracle with a windows .bat for execute some commands. I create the script like this:
***************************
echo off
sqlplus "sys as sysdba"
passwd
commands
exit
***************************
When I execute the .bat i only obtain the passwd request. The problem is that only execute the first line.
How can I execute this script? what are the commands that i have to modify?
Thanks in advanced.
-
You can do so by this way:
1. create sql file containing whatever commands you want to execute.ex:
d:\test.sql
;
;
;
.
.
;
2. create another sql file containing , say con.sql
"sys/passwd@ as sysdba" @d:\test.sql
3. create a .bat file as :
echo off
sqlplus @con.sql
Hope this helps
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|