Sponsored Content
Full Discussion: Dbms_scheduler In Unix Shell
Top Forums UNIX for Dummies Questions & Answers Dbms_scheduler In Unix Shell Post 302155837 by manna on Sunday 6th of January 2008 01:24:21 AM
Old 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

How to run unix commands in a new shell inside a shell script?

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

Difference between writing Unix Shell script and AIX Shell Scripts

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

difference between AIX shell scripting and Unix shell 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

How to connect unix server to unix server through shell scripts

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

How to connect unix server to unix server through shell scripts

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

Connecting to multiple unix server from unix server using shell script

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

FTP from windows to unix server using unix shell script

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

Unix Shell Scripting( Calling from Unix to PLSQL)

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

How can i run sql queries from UNIX shell script and retrieve data into text docs of UNIX?

Please share the doc asap as very urgently required. (1 Reply)
Discussion started by: 24ajay
1 Replies

10. UNIX and Linux Applications

Passing variables from UNIX to Ansible to UNIX shell

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
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)
All times are GMT -4. The time now is 03:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy