Oracle backup and recovery

Source: Internet
Author: User

Note: Enter the Windows Administrator prompt in the OEM.
Failed to connect to the host as user administrator: Error: Wrong Password for user
However, the user name is correct. follow these steps:
Control Panel-> Administrative Tools-> Local Security Settings-> User permission assignment-> Log on as a batch job, double-click to add the administrator user

Command
RMAN

Connect target/-- connect to the target database
Backup database; -- full backup
List backupset; -- display backup
Show all -- display all backup Parameters

When you manually delete a database in FRA, you can use the following statement to clear the role of Oracle in FRA, which is equivalent to clearing the logical memory.
1. Crosscheck archivelog all

2. Delete expired archivelog -- delete expired logs
3. Report obsolete report expired backup

Switching between archivelog Modes
Shutdown immedate;
Startup Mount;
Alter database archivelog -- Archive Mode
Alter database open

Noarchivelog mode-only the time point at which the last backup can be restored, which is equivalent to the backup of SQL Server.
Shutdown;
Startup Mount;
Alter database noarchivelog;
Alter database open;

Change the FRA size and position
Alter system set db_recovery_file_dest_size = 2G;
Alter system set db_recovery_file_dest = 'd: \ oracle \ flash_recovery_area ';

Register the recovery directory (the Enterprise Manager cannot create a recovery directory)

SQL> Create tablespace reco_cat datafile 'd: \ oradata \ orcl \ rec_cat.dbf' size 100 m
;

The tablespace has been created.

SQL> create user RMAN identified by RMAN
2 default tablespace reco_cat
3 temporary tablespace temp;

The user has been created.

SQL> grant connect, resource, recovery_catalog_owner to RMAN;

Authorization successful.

 

Connect to the recovery directory
RMAN catalog RMAN/RMAN

RMAN> Create catalog
-- Backup and add an archive log file
Backup Database Plus archivelog Delete input;
-- Set the data file as a part of the backup, which is not backed up by default
Configure controlfile autobackup on
-- Display all configurations
Show all;
-- Delete backupset
Delete backupset 24;

After the archive files of the database are manually deleted, execute the following script for synchronization:
RMAN> allocate channel for maintenance type disk;

RMAN> change archivelog all crosscheck;

RMAN> release channel;
-- Delete all archived logs

Delete archivelog all

Connect target /;
Run {
Allocate channel 'dev1' type disk;
Allocate channel 'dev2' type disk;
Allocate channel 'dev3' type disk;
Backup full tag 'dbfullbackup 'format 'd: \ backup \ full % u _ % P _ % C' Database Plus archivelog;
SQL 'alter system archive log current ';
Backup archivelog all Delete input;
Backup current controlfile format 'd: \ backup \ CTRL % u _ % P _ % C ';
Backup spfile format 'd: \ backup \ spfile % u _ % P _ % C ';
Release Channel dev1;
Release Channel dev2;
Release Channel dev3;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.