Home Database Mysql Tutorial OCM_Session3_2_UsingRMAN

OCM_Session3_2_UsingRMAN

Jun 07, 2016 pm 03:54 PM
r using

2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups

2. Using RMAN 2.1 Configure RMAN options for the PROD database 2.1.1 Turn backup optimization on 2.1.2 Set your default channel to write to /home/oracle/backup (you may have to create this directory ) 2.1.3 Turn on controlfile autobackups to write to /home/oracle/backup/control (you may have to create this directory) 2.1.4 Configure a retention window of 7 days.
首先创建两个文件夹 [oracle@ocm1 ~]$ mkdir /home/oracle/backup [oracle@ocm1 ~]$ mkdir /home/oracle/backup/control
按以下操作: RMAN> show all;
RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_PROD.f'; # default
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters: CONFIGURE BACKUP OPTIMIZATION ON; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U.bak';
new RMAN configuration parameters: CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U.bak'; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP ON; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/PROD_%F.ctl';
new RMAN configuration parameters: CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/PROD_%F.ctl'; new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
new RMAN configuration parameters: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; new RMAN configuration parameters are successfully stored
RMAN> show all;
RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; CONFIGURE BACKUP OPTIMIZATION ON; CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/home/oracle/backup/control/PROD_%F.ctl'; CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup/PROD_%U.bak'; CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbs/snapcf_PROD.f'; # default
RMAN>


2.2 Perform a backup 2.2.1 Perform a backup using your default channel with compression 2.2.2 Include all datafiles in the backup 2.2.3 Include your current control file and spfile 2.2.4 Include all archive logs, then remove the originals. 备份,使用缺省通道,压缩备份,包括所有文件,包括当前的控制文件的spfile文件,包括所有的归档日志,并将原来的归档日志移除。
RMAN> backup as compressed backupset database include current controlfile plus archivelog delete all input;

Starting backup at 21-MAR-14 current log archived allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=268 devtype=DISK skipping archive log file /u01/app/oracle/oradata/PROD/Disk2/arch/1_6_842523531.dbf; already backed up 1 time(s) skipping archive log file /u01/app/oracle/oradata/PROD/Disk2/arch/1_7_842523531.dbf; already backed up 1 time(s) channel ORA_DISK_1: starting compressed archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=8 recid=3 stamp=842717159 input archive log thread=1 sequence=9 recid=4 stamp=842790340 input archive log thread=1 sequence=10 recid=5 stamp=842796122 channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_06p3o334_1_1.bak tag=TAG20140321T140208 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:17 channel ORA_DISK_1: deleting archive log(s) archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_8_842523531.dbf recid=3 stamp=842717159 archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_9_842523531.dbf recid=4 stamp=842790340 archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_10_842523531.dbf recid=5 stamp=842796122 channel ORA_DISK_1: deleting archive log(s) archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_6_842523531.dbf recid=1 stamp=842627911 archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_7_842523531.dbf recid=2 stamp=842644301 Finished backup at 21-MAR-14
Starting backup at 21-MAR-14 using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00004 name=/u01/app/oracle/oradata/PROD/Disk1/example01.dbf input datafile fno=00001 name=/u01/app/oracle/oradata/PROD/Disk1/system01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/PROD/Disk1/sysaux01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/PROD/Disk1/undotbs01.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/PROD/Disk1/users01.dbf input datafile fno=00008 name=/u01/app/oracle/oradata/PROD/Disk1/oltp01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/PROD/Disk1/indx01.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/PROD/Disk1/tools01.dbf channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_07p3o33u_1_1.bak tag=TAG20140321T140235 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:03:39 channel ORA_DISK_1: starting compressed full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset including current control file in backupset channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_08p3o3aq_1_1.bak tag=TAG20140321T140235 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 21-MAR-14
Starting backup at 21-MAR-14 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting compressed archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=11 recid=6 stamp=842796380 channel ORA_DISK_1: starting piece 1 at 21-MAR-14 channel ORA_DISK_1: finished piece 1 at 21-MAR-14 piece handle=/home/oracle/backup/PROD_09p3o3av_1_1.bak tag=TAG20140321T140620 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05 channel ORA_DISK_1: deleting archive log(s) archive log filename=/u01/app/oracle/oradata/PROD/Disk2/arch/1_11_842523531.dbf recid=6 stamp=842796380 Finished backup at 21-MAR-14
Starting Control File and SPFILE Autobackup at 21-MAR-14 piece handle=/home/oracle/backup/control/PROD_c-254361867-20140321-00.ctl comment=NONE Finished Control File and SPFILE Autobackup at 21-MAR-14
RMAN>

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1272
29
C# Tutorial
1252
24
Python or R: Which programming language is better for data science? Python or R: Which programming language is better for data science? Apr 12, 2023 am 08:28 AM

A little background on R R is a programming language and analysis tool developed by Ross Ihaka and Robert Gentleman and first introduced in 1993. At the same time, it is also a free open source software with a rich statistical and graphical technology library. R is one of the most used tools by analysts, statisticians, and researchers for retrieving, cleaning, analyzing, visualizing, and presenting data. Many industries such as IT, banking, healthcare, and finance use R. Purpose Data scientists can use the R programming language to collect data, perform statistical analysis, and produce visualizations. It can be used for graphical representation. R can be used for both machine learning and deep

How does Redstone (RED) benefit BNBHolder this airdrop? How does Redstone (RED) benefit BNBHolder this airdrop? Mar 04, 2025 pm 06:06 PM

Redstone (RED) airdrop activity brings great benefits to BNB holders! Redstone, an innovative multi-chain oracle project that supports more than 70 blockchains and covers more than 1,250 assets, has its token RED airdropped through Binance Launchpool. By participating in the activities, BNB holders can invest idle assets into the RED reward pool for mining, obtain RED tokens, realize asset appreciation, improve asset utilization efficiency, enrich investment portfolios, and reduce risks. However, we need to pay attention to volatility in the cryptocurrency market, invest rationally, and assess risks carefully. Join Redstone (RED) airdrop now and seize wealth opportunities!

Win11 Build 23419 preview version introduces new features: Screen recording can now be completed through the Win + Shift + R shortcut key Win11 Build 23419 preview version introduces new features: Screen recording can now be completed through the Win + Shift + R shortcut key Dec 21, 2023 pm 05:08 PM

Microsoft today released the Win11Build23419 preview update for WindowsInsider project members in the Dev channel. In addition to many improvements such as the new USB4 settings page in this update, some new functions/features introduced by Microsoft have not been written into the update log. Microsoft is about to introduce a new function/feature to Win11. Users can use the Win+Shift+R shortcut combination to record the screen. However, this function is not yet effective. After using this keyboard shortcut, the regular screenshot UI will be opened instead of the screen recording UI. Netizens can enable the above new functions and features through the ViveTool tool: 1. Download the Vivetool tool from the GitHub page, and then

What is the difference between PHP functions and R functions? What is the difference between PHP functions and R functions? Apr 25, 2024 pm 03:51 PM

PHP and R functions have the following differences in syntax, data types, data structures and function scope: 1. Syntax: PHP functions follow C-style syntax, while R functions use S-style syntax. 2. Data type: PHP is a weakly typed language, while R is a strongly typed language. 3. Data structure: PHP supports a variety of data structures, while R is dedicated to statistical data and provides optimized data structures. 4. Function scope: PHP function scope is limited to the function body, while R function scope is more complex.

What is the role of r in linux What is the role of r in linux Mar 25, 2023 am 10:22 AM

The role of r in Linux is to read the actual content of this file; having r permission in Linux means that you can read the directory structure list, which means you can view the file names and subdirectory names under the directory; the main content of the directory is the record file A list of names and subdirectories, not where the data actually resides.

Detailed introduction to R71700 compatibility with Windows 11 Detailed introduction to R71700 compatibility with Windows 11 Jan 13, 2024 pm 05:24 PM

As we all know, the win11 upgrade has very high requirements for the processor, so some AMD Ryzen r71700 processor users don’t know whether their computers can install the win11 system. In fact, we don’t have to worry, it can be installed. Let’s follow the editor’s instructions Let's get up and take a look at the specific situation. Can r71700 be installed with win11? Answer: r71700 processor can be installed with win11 system. Installation method one: 1. First enter "Settings" through the start menu in the lower left corner 2. Then select "Update and Security" 3. Then enter the Windows Insider Program, and after joining, select "dev channel" 4. Then enter "Windows Update ”, where you can download and install win11 by detecting updates.

What is the difference between Java functions and R language functions? What is the difference between Java functions and R language functions? Apr 23, 2024 pm 01:24 PM

The difference between Java and R functions is: definition method: Java uses the publicstatic modifier, and R uses the function keyword. Parameter passing: Java uses value passing, and R usually uses reference passing. Return type: Java must declare it explicitly, R infers it implicitly at runtime.

How to upgrade r720 to win11 How to upgrade r720 to win11 Dec 25, 2023 pm 05:31 PM

The Savior r720 is a notebook model launched by Lenovo’s Savior series in 2017. Although 5 years have passed, it can still run smoothly for almost all games. Therefore, some users also want to use it to update the latest win11 system, but don't know how to upgrade. Let's take a look below. How to upgrade r720 to win11: 1. Unfortunately, r720 uses the seventh generation Intel processor, which does not meet Microsoft's requirements for win11. 2. Therefore, if users want to upgrade to win11, they must skip the system detection and upgrade in the pe system. 3. To enter the pe system, you first need to prepare a system U disk. 4. If we do not have a bootable USB disk, we need to manually create it.

See all articles