Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Schedule SQL*Plus on NT

Re: Schedule SQL*Plus on NT

From: Corey G. <corey_gill_at_my-deja.com>
Date: Wed, 14 Jul 1999 12:56:42 GMT
Message-ID: <7mi1e8$gf8$1@nnrp1.deja.com>


Hello. Can you provide an NT example of this ?

This works fine on vms, but does not work on nt (test.cmd | test.com):  sqlplus user/pass_at_dbname
 select sysdate from dual;
 exit;

On vms, it logs in, runs the select, and exits ok. On nt, it opens sql*plus and logs in, but doesn't do the select or exit. It sits there at the sql> prompt. On vms, I have sql*plus 3.3.3 (oracle73), and 804 on nt.

If I do this it works on vms and nt:

test.cmd | test.com:
 sqlplus user/pass_at_dbname @test.sql

test.sql
 select sysdate from dual;
 exit;

If sql*plus fails to connect on vms, it exits. On nt however, it will prompt for the username again - not what I want for non-interactive scheduled jobs. The only way I can get the desired behaviour is to use redirection, such as:

sqlplus user/pass_at_db < test.sql
or sqlplus < test1.sql

This will work okay, but only in 815, not in 804 or 805. I need a solution for 804. Also, I would lose the ability to pass parameters to the script. Any other suggestions on how to schedule sql*plus on nt and have it abort on connection failure ?

In article <7mg8k3$mpu_at_gap.cco.caltech.edu>,   xux_at_informa.bio.caltech.edu (XU) wrote:
> You may want to place the user/password in the script.sql file
itself, if
> you need the desired behavior - sql*plus will abort if the
usr/password is
> incorrect.
>
> Robert Xu
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Jul 14 1999 - 07:56:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US