-
SQL*Plus will exit without an exit if called this way:
sqlplus user/password<<-EOF
@script.sql
EOF
This works on UNIX. Can someone tell how to achive it on Dos/Windows?
Basically, I donot have "exit" in sql script. When the script is run from sqlplus command, it should quit sqlplus session, without explicit call to exit.
Pl help.
-
I cannot understand why you cannot add 'EXIT' to your script.
-
inside SCRIPT.SQL for example:
insert into table1 values('dfdf',3343,33443);
commit;
exit
in DOS or a batch file:
sqlplus user/password@tnsname @SCRIPT.SQL
your sqlplus had been executed from DOS.
Hope this clears you.
-
Actually I asked the wrong question. Please ignore my question on quitting sqlplus without exit in .sql file.
The real question I have is this:
What is the equivalent of following for Windows(or Dos):
sqlplus user/password<<-EOF
set define off;
@script1.sql
alter table x disable constraint fk_x;
@script2.sql
EOF
The above syntax works on unix to run 2 sql scripts from sqlplus. I donot want to invoke sqlplus command twice separately.
Pl help.
-
You can call the second script from the first one itself:
In the first script, just type @@script2.sql at the end.
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
|