I am writing a script to be executed from Oracle Scheduler. This script works flawlessly when executed at the shell prompt, but fails when executed from Oracle Scheduler due to the issues explained in the Oracle Link below:
## Below script works as part of the script perfectly, but not when executed through Oracle Scheduler -
Q is, how can I write to the file without using any sort of redirector?
Thanks for the suggestions.
Last edited by rbatte1; 03-29-2017 at 10:32 AM..
Reason: Converted to link and added CODE tags
The oracle scheduler does not have write access to the directory/file, or your script does not cd to a place where the scheduler can write. The /tmp directory is a possibility.
try:
The scheduler uses streams if I recall correctly. Runs as the oracle user. This is a form of interprocess communication between the oracle kernel and UNIX.
Note: it will likely not write to the same place that the output of DBMS_OUTPUT, UTL_FILE operations or spool is set in pl/sql, so there is probably a filename.out somewhere. IF in fact the oracle user had write privilege to the directory. You may need a directory object created by the DBA to point to where you want to write your pl/sql or sql output to use i.e., /tmp <- this would allow both processes to write to a common directory, /tmp. And a change to the directory name in any scripts.
Last edited by jim mcnamara; 03-28-2017 at 09:04 PM..
This User Gave Thanks to jim mcnamara For This Post:
It might come down the account you are running as, the environment set up in the shell you are running and what Jim has already suggested.
I don't have the Oracle Scheduler, but can you write a simple script like this and run it, then examine the syslog?
Hopefully that will splat your environment out. You could also try with the set command instead of env and have a look at what you get. Think about PATH, PWD, USER or LOGNAME and examine what else is showing. Perhaps what you want to run is blocked for some other reason.
Hi Everyone,
I want your help to write a script which will take text file as input and on the basis of delimiter ":"script will create excel sheet.
Example input:
IpAdress:InstanceName:Port:ServerName
10.255.255.1:abc:2232:xyz_abc
Output should be an excel sheet like below:
Column... (8 Replies)
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
I have file which contains a huge amount of data. I need to search the pattern Message id. When that pattern is matched I need to get abcdeff0-1g6g-91g3-1z2z-2mm605m90000 to another file.
Kindly provide your input.
File is like below
Jan 11 04:05:10 linux100 |NOTICE... (2 Replies)
Hi Friends,
I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving...
File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Hi All,
I am having an XML tag like:
<detail sim_ser_no_1="898407109001000090"
imsi_1="452070001000090">
<security>ADM1=????</security>
<security>PIN1=????</security>
<security>PIN2=????</security>
... (2 Replies)
I am out of idea what to do to resolve the problem!
I need to use the open(file, for.., access) function to write a file.
Never have the situation like that: it is return 0 - zero.
As a result all write(..) going to the screen!
What the problem it could be?
I do not even know... (2 Replies)
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
I need make serial data from virtual serial ports available on a TCP/IP network.
For communications with hardware COM ports to send and receive serial data over a local network or the Internet.
Example:
POSIX machine (/dev/ttyS0) <--- TCP/IP ---> Windows machine COM1
Please help! I try use... (0 Replies)
Hi ,
I need to have an application where in I am able to create a virtual Serial port on a UNIX machine for a remote device which is accessible by a IP address and a port number (by terminal server). Both the machine and the remote device are on the same network. So after this application is... (1 Reply)