bmsande
asked on
create and execute sql script in sqlplus
attention oracle dba's, i've got a lob ball question that yall can smash out of the park. I've got about 500 update statements aready formatted. example:
UPDATE KUAF SET NAME="AG:SERF:IND75951:GST " WHERE NAME="SERF-IND75951"
I just need to put all of these update statements in a correctly formatted sql script, and execute it via sql plus (with a log file piped to the file system).
UPDATE KUAF SET NAME="AG:SERF:IND75951:GST
I just need to put all of these update statements in a correctly formatted sql script, and execute it via sql plus (with a log file piped to the file system).
ASKER
excellent, now how do i call it from sql plus
sqlplus username/password @myscriptfile.txt
ASKER
im not able to connect via cmd prompt. But i can log into sql plus via the application.
i'm looking at a SQL> prompt. how to do excute the script from here?
i'm looking at a SQL> prompt. how to do excute the script from here?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also use a batch script which can call your sqlplus ffrom oracle home and can run the sql scripts.
@xyz.sql
But as you said you cannot login through cmd ...then I have a small question.
Is you database on the system you are using or in remotely ?
@xyz.sql
But as you said you cannot login through cmd ...then I have a small question.
Is you database on the system you are using or in remotely ?
at the top of the script add:
set echo on
spool mylog.log
UPDATE KUAF SET NAME='AG:SERF:IND75951:GST
...
at the end:
spool off