2.1 Operational Requirements
1. Process and memory requirements
The need for more processes
Allocation of large pools
2. Basic Environment variable Demand
Oracle_sid, Oracle_home, PATH, Nls_lang, if you use a time based backup and restore
Duplicate, need to set up additional Nls_date_format
3. Permission Requirements
Requires SYSDBA system permissions
If it is local, you can use the OS certification, remote need to use password file authentication
4, version requirements
The RMAN tool version must be the same version as the target database, and if the recovery directory is used, you need to be aware
More Wonderful content: http://www.bianceng.cn/database/Oracle/
• The script version that creates the Rman recovery directory must be equal to or greater than the version of the database where the recovery directory resides
• The script version that creates the Rman recovery directory must be equal to or greater than the version of the target database
2.2 Basic Operation method
9i default is Nocatalog, no recovery directory, use command Rman to enter the Rman command line interface, such as
[Oracle@db oracle]$ $ORACLE _home/bin/rman
Recovery Manager:release 9.2.0.4.0-production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
Rman>
To connect to the target database, you can use the following similar command
Rman>connect Target/
2.3 How to run the Rman command
1. Single execution
Rman>backup database;
2. Run a command block
Rman> Run {
2> copy DataFile to
3> '/oracle/prod/backup/prod_10.dbf ';
4>}
3. Run the script
$ Rman target/@backup_db. Rman
Rman> @backup_db. Rman
Rman> RUN {@backup_db. Rman}
Run a script stored in the recovery directory
Rman> RUN {EXECUTE SCRIPT backup_whole_db};
4, shell script, if executed in Cron, note set the correct environment variable in the script
[Oracle@db worksh]$ more rmanback.sh
#!/bin/ksh
#set env
Export oracle_home=/opt/oracle/product/9.2
Export Oracle_sid=test
Export nls_lang= "AMERICAN_AMERICA.ZHS16GBK"
Export path= $PATH: $ORACLE _home/bin
echo "-----------------------------start-----------------------------";d ate
#backup start
$ORACLE _home/bin/rman <<eof
Connect target
Delete NoPrompt obsolete;
Backup database format '/netappdata1/rmanback/tbdb2/%u_%s.bak ' Filesperset = 2;
Exit
Eof
echo "------------------------------end------------------------------";d ate