50.恢复目录在生产环境中的应用
1.恢复目录
[oracle@yuanzj.com:/home/oracle]$ sas
SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 5 17:55:40 2023
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
sys@ORCL10G 2023-03-05 17:55:40> create tablespace catadb datafile '/oradata/orcl10g/catadb01.dbf' size 100m autoextend on maxsize 30720m
2 ;
Tablespace created.
Elapsed: 00:00:00.77
sys@ORCL10G 2023-03-05 17:56:33> create user catau identified by catau123 default tablespace catadb;
User created.
Elapsed: 00:00:00.01
sys@ORCL10G 2023-03-05 17:57:03> grant connect,resource to catau;
Grant succeeded.
Elapsed: 00:00:00.01
sys@ORCL10G 2023-03-05 17:57:19> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
[oracle@yuanzj.com:/home/oracle]$ sas
SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 5 17:57:45 2023
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
sys@ORCL10G 2023-03-05 17:57:45> grant recovery_catalog_owner to catau;
Grant succeeded.
Elapsed: 00:00:00.00
sys@ORCL10G 2023-03-05 17:58:07> quit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
[oracle@yuanzj.com:/home/oracle]$ rman target / catalog catau/catau123
Recovery Manager: Release 10.2.0.5.0 - Production on Sun Mar 5 17:58:36 2023
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORCL10G (DBID=1313046744)
connected to recovery catalog database
RMAN> create catalog;
recovery catalog created
RMAN> register database;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> list backup;
RMAN> backup database;
Starting backup at 2023-03-05 18:03:34
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=141 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/oradata/orcl10g/system01.dbf
input datafile fno=00003 name=/oradata/orcl10g/sysaux01.dbf
input datafile fno=00005 name=/oradata/orcl10g/example01.dbf
input datafile fno=00006 name=/oradata/orcl10g/catadb01.dbf
input datafile fno=00002 name=/oradata/orcl10g/undotbs01.dbf
input datafile fno=00004 name=/oradata/orcl10g/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2023-03-05 18:03:35
channel ORA_DISK_1: finished piece 1 at 2023-03-05 18:03:50
piece handle=/u01/app/ora10g/flash_recovery_area/ORCL10G/backupset/2023_03_05/o1_mf_nnndf_TAG20230305T180335_l08t7qt8_.bkp tag=TAG20230305T180335 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 2023-03-05 18:03:51
channel ORA_DISK_1: finished piece 1 at 2023-03-05 18:03:52
piece handle=/u01/app/ora10g/flash_recovery_area/ORCL10G/backupset/2023_03_05/o1_mf_ncsnf_TAG20230305T180335_l08t87dp_.bkp tag=TAG20230305T180335 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 2023-03-05 18:03:52
RMAN> unregister database;
database name is "ORCL10G" and DBID is 1313046744
Do you really want to unregister the database (enter YES or NO)? YES
database unregistered from the recovery catalog
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?