Home  >  Article  >  Database  >  使用RMAN备份片信息远程恢复数据库一例

使用RMAN备份片信息远程恢复数据库一例

WBOY
WBOYOriginal
2016-06-07 17:12:04919browse

1、挂载备份服务器的备份目录 1、建立备份片存放目录,这里没有使用catalog,所以需要和生产库备份目录路径相同 mkdir /prod/ba

1、挂载备份服务器的备份目录

1、建立备份片存放目录,这里没有使用catalog,,所以需要和生产库备份目录路径相同

mkdir /prod/backup/

2、挂载备份服务器备份目录

showmount -e 192.168.8.148

mount 192.168.8.148:/arc_bk/other_bk /prod/backup

bdf

2、创建远程测试库所需pfile

1、生产库中生成pfile

create pfile='/tmp/initfact.ora' from spfile ;

2、远程测试库创建所需的pfile

vi $Oracle_HOME/dbs/initfact.ora

fact.__db_cache_size=180355072

fact.__java_pool_size=4194304

fact.__large_pool_size=4194304

fact.__shared_pool_size=100663296

fact.__streams_pool_size=0

*.audit_file_dest='/u01/apps/oracle/admin/fact/adump'

*.background_dump_dest='/u01/apps/oracle/admin/fact/bdump'

*.compatible='10.2.0.1.0'

*.control_files='/u01/fact/control01.ctl','/u01/fact/control02.ctl','/u01/fact/control03.ctl'  

*.core_dump_dest='/u01/apps/oracle/admin/fact/cdump'

*.db_block_size=8192

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='fact'

*.db_recovery_file_dest='/u01/apps/oracle/flash_recovery_area'

*.db_recovery_file_dest_size=2147483648

*.dispatchers='(PROTOCOL=TCP) (SERVICE=factXDB)'

*.job_queue_processes=10

*.log_archive_dest_1='location=/u01/arch1'

*.open_cursors=300

*.pga_aggregate_target=96468992

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=290455552

*.undo_management='AUTO'

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/u01/apps/oracle/admin/fact/udump'

3、保证远程测试库数据目录的可用性

1、建立目录

mkdir -p /u01/apps/oracle/admin/fact/adump

mkdir -p /u01/apps/oracle/admin/fact/bdump

mkdir -p /u01/apps/oracle/admin/fact/cdump

mkdir -p /u01/apps/oracle/admin/fact/udump

mkdir -p /u01/fact/

mkdir -p /u01/apps/oracle/flash_recovery_area

mkdir -p /u01/fact/datafiles

mkdir -p /u01/fact/logfiles

2、确定权限

ls -l /u01/apps/oracle/admin/fact/

ls -l /u01/fact

ls -l /u01/

ls -l /u01/apps/oracle/

3、查看磁盘空间

bdf

4、保证远程测试库备份信息的可用性

确保nfs目录中的数据能够被nobody可读可写的权限。

ls -l /prod/backup/

5、将远程测试库启动到nomount

在使用rman的时候需要使用相应的内存,所以需要数据库至少启动到nomount状态下。

export ORACLE_SID=fact

sqlplus / as sysdba

startup nomount ;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn