Oracle database non-archive mode data backup and recovery

Simulate the USER01.DBF file is deleted to restore

1. First check the database to confirm that it is in non-archive mode

archive log list;

2. Use rman for full backup

Because it is a non-archive mode, you need to modify the database to mount mode (shutdown immediate; shut down the database and then startup mount;)

Then use rman for backup

rman target /

Execute the following command to create a full backup

run{
allocate channel ch_1 type disk;
backup database
format '/backup/all_%t_%u.bak';
}

After completion, you can see files in /backup/

Move or rename USER01.DBF. Originally, our database was in mount mode. If you want to modify it to open mode, the following error will be reported

2. Perform full recovery of the database (the database still needs to be in mount mode)

Then enter rman and execute the following commands:

run{
allocate channel ch_1 type disk;
restore database;
}

Finally alter database open;

Normal start

Guess you like

Origin blog.csdn.net/zetion_3/article/details/114316945