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

Example Analysis of Table Space in oracle 11g Manual Hot standby

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about the sample analysis of tablespaces in oracle 11g manual hot backup. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Manual hot backup must be carried out in archive mode. Read-only table space cannot do hot backup, and temporary table space does not need to do hot backup.

SYS@PROD > archive log list;-- enables archiving Database log mode Archive ModeAutomatic archival EnabledArchive destination / u01/app/oracle/product/11.2.0/dbhome_1/dbs/archOldest online log sequence 1Next log sequence to archive 1Current log sequence 1SYS@PROD > SYS@PROD > create table T8 (id number) tablespace users;-- to create tables and insert data to submit Table created.SYS@PROD > insert into T8 values (88); 1 row created.SYS@PROD > commit Commit complete.SYS@PROD > select * from T8; ID- 88SYS@PROD > alter tablespace users begin backup;-- start hot backup users tablespace Tablespace altered. [oracle@enmoedu1 ~] $cp users01.dbf / home/oracle/-- backup user tablespace data file SYS@PROD > alter tablespace users end backup;-- end backup users tablespace Tablespace altered.

Close the database, delete the users data file, and then start the database

SYS@PROD > shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down. Delete the users data file [oracle@enmoedu1 PROD] $rm-rf users01.dbfSYS@PROD > startupORACLE instance started.Total System Global Area 835104768 bytesFixed Size 2257840 bytesVariable Size 536874064 bytesDatabase Buffers 289406976 bytesRedo Buffers 6565888 bytesDatabase mounted.ORA-01157: cannot identify/lock data file 4-see DBWR trace fileORA-01110: data file 4:'/ u01ax oradata

Copy the backed up users data files to the original directory of the database

Mv / home/oracle/users01.dbf / u01/app/oracle/oradata/PROD-- copy the data file SYS@PROD > select open_mode from vested database Alter database open*ERROR at line 1:ORA-01113: file 4 needs media recoveryORA-01110: data file 4:'/ u01 id id for users data files is 4-select file_name,file_id,tablespace_name from dba_data_files where tablespace_name='USERS' FILE_NAME FILE_ID TABLESPACE_NAME--- / u01/app/oracle/ Oradata/PROD/users01.dbf 4 USERSSYS@PROD > recover datafile 4 -- restore data file No. 4 Media recovery complete.SYS@PROD > alter database open;-- open data file Database altered.SYS@PROD > select open_mode from vested database boot open model WRITESYS@PROD > select * from T8; ID- 88 Thank you for reading! This is the end of the article on "sample analysis of tablespaces in oracle 11g manual hot backup". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

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