Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle 12.2 create detached Jobs

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Detach job must point to a program object whose detach property is set to true. The box below is to create a nightly job on Linux and the system to perform a backup of the database.

1. Create a script to invoke the RMAN backup script, named $ORACLE_HOME/scripts/backup.sh

[oracle@sjjh scripts] $vi backup.shexport ORACLE_HOME=/home/app/oracle/product/11.2.0export ORACLE_SID=sjjhexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib$ORACLE_HOME/bin/rman TARGET / @ $ORACLE_HOME/scripts/backup.rmantrace / home/app/oracle/backup/backup.out & exit 0

two。 Create a rman backup script named $ORACLE_HOME/scripts/backup.rman

[oracle@sjjh scripts] $vi backup.rmanrun {# Perform full database backupbackup full format "/ home/app/oracle/backup/%d_FULL_%U" (database); # Open database after backupalter database open;# Call notification routine to indicate job completed successfullysql "BEGIN DBMS_SCHEDULER.END_DETACHED_JOB_RUN (''sys.backup_job'', 0penol null); END;";}

3. Create a job and use the separator object

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report