RE: How to stop script

2003-06-17 Thread Sinardy Xing
Hi Chen, My solution will be about the same with previous DBA guru I assume u r using Window (if is unix you just need to change a little bit here and there) I write this script for you. +save as imp.sql++ SET HEAD OFF SET FEEBACK OFF SET

Re: How to stop script

2003-06-17 Thread Pete Finnigan
Hi You can stop the script by using the line whenever sqlerror exit rollback and then generating an error by using an exception in a PL/SQL block as follows: oracle:jupiter cat imp.sql whenever sqlerror exit rollback declare cursor c_db is select name from v$database;

Re: How to stop script

2003-06-17 Thread jinchen
Thanks! That's exactly what I need! Jin Quoting Pete Finnigan [EMAIL PROTECTED]: Hi You can stop the script by using the line whenever sqlerror exit rollback and then generating an error by using an exception in a PL/SQL block as follows: oracle:jupiter cat imp.sql whenever

How to stop script

2003-06-16 Thread jinchen
I have a script and can be run on commandline like: sqlplus usrname/password@TEST @import.sql However, I want to check database name at the beginning of import.sql. I knew select name from v$database can obtain database name. But how can I stop the script if I found it is not TEST

Re: How to stop script

2003-06-16 Thread Arup Nanda
You could use a little indirect approach in this case. The file import.sql will look like this set feed off set lines 120 set trimpsool off set pages 0 spool imp.sh select 'imp un/[EMAIL PROTECTED] file=a.dmp full=yes' from v$database where name = 'TEST' / spoo off exit You have another script

RE: How to stop script

2003-06-16 Thread Jorma.Vuorio
Ave ! Here is one possible solution. Create two tiny scripts. First script let say ex.sql which includes only word exit and linefeed and second one cont.sql which has only one space character, nothing else. Then in Your sql script: -- column NAME noprint new_value SCRIPT_NAME select