Home » RDBMS Server » Server Administration » A problem of Unix connected Oracle
A problem of Unix connected Oracle [message #116151] Mon, 18 April 2005 03:51 Go to next message
GuteNacht
Messages: 16
Registered: April 2005
Junior Member
Hi

I met a problem. Thank you for your considering my case.

There is a file called "daily.dat" in unix

The scripts are:

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

then I used the command
at now < daily.dat
The message on the screen is
job 1113791755.a-12517 at Mon Apr 18 10:35:55 2005
I think it does mean the task has been executed successfully

But there is no action in the table "report_trigger"

why?

Days ago, I tried the same file and the same command in linux and oracle8. It was OK.

But now, when I was using unix and oracle7. It couldn't work.

Would you please answer this question for me?

It is an urgent task.

I do greatly appreciate it very much.

Re: A problem of Unix connected Oracle [message #116194 is a reply to message #116151] Mon, 18 April 2005 09:19 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Although I'm sure there are several ways to run things, I always ran them differently with at when I was on unix. Like:

sqlplus / "@program.sql" | at -k now

You may have to alter the quotes. Also the -k may or may not be needed depending on your shell. And of course you probably would be using a future time and not the now keyword.

Also, make sure your script works interactively before running it with at. Like, is update_trigger an actual table?
Re: A problem of Unix connected Oracle [message #116202 is a reply to message #116151] Mon, 18 April 2005 09:53 Go to previous messageGo to next message
chunyuh
Messages: 13
Registered: April 2005
Junior Member
On some flavor of Unix, you need to specify the environment for at or cron job.

add the following lines to your script

export ORACLE_HOME=...
export ORACLE_SID=....
export PATH=$PATH:$ORACLE_HOME/bin


Wish it helps.


Chunyu Hu

http://mtsmart.kmip.net

[Updated on: Mon, 18 April 2005 09:54]

Report message to a moderator

Re: A problem of Unix connected Oracle [message #116355 is a reply to message #116194] Tue, 19 April 2005 10:51 Go to previous message
GuteNacht
Messages: 16
Registered: April 2005
Junior Member
thank you!
Previous Topic: More than 1 ROWIDs for 1 single record
Next Topic: A problem on Win2k + Oracle, Thank you!
Goto Forum:
  


Current Time: Fri Sep 27 02:32:18 CDT 2024