Home » RDBMS Server » Server Administration » A problem on Win2k + Oracle, Thank you!
A problem on Win2k + Oracle, Thank you! [message #116358] Tue, 19 April 2005 11:07 Go to next message
GuteNacht
Messages: 16
Registered: April 2005
Junior Member
Days ago, I used system Unix + Oracle. And I used "at" (command in Unix) to update a table in Oracle at a fixed time everyday.

But now, the enviroment is changed to be Win2kServer + Oracle. How should I do to make the same work as above? That is, how to update the table in Oracle in the windows enviroment?

Thank you!

Is the following OK?

I add a a.sql file in the schedule task
The a.sql file is as following:

sqlplus system/manager <<EOF
update report_trigger
set updatetime=sysdate where id=98;
commit;
EOF

Is that OK?

I do greatly appreciate it very much!
Re: A problem on Win2k + Oracle, Thank you! [message #116359 is a reply to message #116358] Tue, 19 April 2005 11:12 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
whatever environment it is,
you need to exit the sqlplus.

update report_trigger
set updatetime=sysdate where id=98;
commit;
exit;


EOF will not work for windows ( unless you have an unix emulator).

--this should be it
-- create a batch file myscript.bat that contains the connect info
-- Using system/manager account for any NON administrative task or
-- storing objects in system schema is NOT recomended.
sqlplus system/manager@connectstring @a.sql
-- a.sql should contain
update report_trigger
set updatetime=sysdate where id=98;
commit;
exit;

[Updated on: Tue, 19 April 2005 11:13]

Report message to a moderator

Previous Topic: A problem of Unix connected Oracle
Next Topic: question on Inactive connection?
Goto Forum:
  


Current Time: Sun Jan 26 04:28:48 CST 2025