In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.