01-06-2008
Dbms_scheduler In Unix Shell
I trying to call shell scripts through DBMS_SCHEDULER of Oracle. My procedure executed successfully and my shell scripts executed perfect in UNIX. However, the job does not run when i look through in SQL. I dont see any errors. Did any one of you use dbms_scheduler package to call shell scripts ? Do i need to add anything in my shell scripts? Please help
SQL> BEGIN
2 DBMS_SCHEDULER.CREATE_PROGRAM(
3 PROGRAM_NAME =>'CMS_DATABASE_BKUP',
4 PROGRAM_ACTION =>'/u01/j.ksh',
5 PROGRAM_TYPE => 'EXECUTABLE',
6 ENABLED => TRUE);
7
8 DBMS_SCHEDULER.CREATE_SCHEDULE(
9 SCHEDULE_NAME => 'CMS_SCHEDULE',
10 START_DATE => SYSDATE,
11 REPEAT_INTERVAL =>
12 'FREQ=HOURLY; INTERVAL=1',
13 COMMENTS=>'BACKUP');
14
15 DBMS_SCHEDULER.CREATE_JOB(
16 JOB_NAME => 'MSV_FULL',
17 JOB_TYPE => 'EXECUTABLE',
18 JOB_ACTION =>'/u01/j.ksh',
19 ENABLED => TRUE,
20 START_DATE => SYSDATE,
21 REPEAT_INTERVAL =>
22 'FREQ=HOURLY; INTERVAL=1',
23 COMMENTS=>'BACKUP');
24 END;
25 /
Shell scripts- j.ksh
rman target=/ <<EOF
SHUTDOWN IMMEDIATE
STARTUP MOUNT
ALLOCATE CHANNEL C1 DEVICE TYPE DISK
FORMAT '/U01/ORADATA/%U'
BACKUP DATABASE PLUS ARCHIVELOG;
SQL 'ALTER DATABASE OPEN';
>> EXIT;
EOF
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I am having one situation in which I need to run some simple unix commands after doing "chroot" command in a shell script. Which in turn creates a new shell.
So scenario is that
- I need to have one shell script which is ran as a part of crontab
- in this shell script I need to do a... (2 Replies)
Discussion started by: hkapil
2 Replies
2. AIX
Hi,
Please give me the detailed Differences between writing Unix Shell script and AIX Shell Scripts. Thanks in advance..... (0 Replies)
Discussion started by: haroonec
0 Replies
3. Shell Programming and Scripting
please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies
4. Shell Programming and Scripting
Hi,
I would like to connect UNIX server to UNIX server through shell scripts
and i have some concepts . But i am totally confused how to connect UNIX
server to UNIX server throuth running a script. It will be greatful to me if
any buddy will help me.
Thanks in advance.
Phatan:) (2 Replies)
Discussion started by: phatan
2 Replies
5. Shell Programming and Scripting
Hi,
I would like to connect UNIX server to UNIX server through shell scripts
and i have some concepts . But i am totally confused how to connect UNIX
server to UNIX server throuth running a script. It will be greatful to me if
any buddy will help me.
with simple example please.
Thanks in... (2 Replies)
Discussion started by: phatan
2 Replies
6. Shell Programming and Scripting
Hi Gurus,
I'm a unix newbie and I would like to connect to multiple unix servers from unix server using shell script i.e from server a to server b,c,d etc. I want to copy the files from unix server a to server b, c, d. I can access staright using ssh without the need to have password and user... (5 Replies)
Discussion started by: sexyTrojan
5 Replies
7. Shell Programming and Scripting
Hi,
Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting?
If so what command i need to use.
thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies
8. UNIX for Dummies Questions & Answers
Hello Experts,
I have the following questions to be discussed here at this esteemed discussion forum.
I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
Discussion started by: faizsaadq
1 Replies
9. Shell Programming and Scripting
Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies
10. UNIX and Linux Applications
I m passing a variable stringg from Unix shell which has value 'Good Day' to ansible and from ansible to a second shell script where it print only Good instead of 'Good Day'
passing the variable stringg from unix shell script1.sh
echo $stringg
ansible-playbook install.yml -i... (1 Reply)
Discussion started by: mohtashims
1 Replies
LEARN ABOUT SUNOS
suspend
suspend(1) User Commands suspend(1)
NAME
suspend - shell built-in function to halt the current shell
SYNOPSIS
sh
suspend
csh
suspend
ksh
suspend
DESCRIPTION
sh
Stops the execution of the current shell (but not if it is the login shell).
csh
Stop the shell in its tracks, much as if it had been sent a stop signal with ^Z. This is most often used to stop shells started by su.
ksh
Stops the execution of the current shell (but not if it is the login shell).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), kill(1), ksh(1), sh(1), su(1M), attributes(5)
SunOS 5.10 15 Apr 1994 suspend(1)