standby_file_management参数

standby_file_management参数
1,备库修改参数,主库创建表空间
alter system set standby_file_management=manual;
17:16:15 sys@prodadg1>create tablespace t1 datafile '/data/prodadg1/t01.dbf' size 10m;
Tablespace created.
备库报错
Tue Feb 14 17:21:55 2017
Errors in file /u01/app/oracle/diag/rdbms/prod/prod/trace/prod_dbw0_2559.trc:
ORA-01186: file 6 failed verification tests
ORA-01157: cannot identify/lock data file 6 - see DBWR trace file
ORA-01111: name for data file 6 is unknown - rename to correct file
ORA-01110: data file 6: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006'


2,备库的控制文件已经存在该表空间的信息
SQL> select name from v$datafile;


NAME
--------------------------------------------------------------------------------
/oradata/prod/system01.dbf
/oradata/prod/sysaux01.dbf
/oradata/prod/undotbs01.dbf
/oradata/prod/users01.dbf
/oradata/prod/test01.dbf
/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006
备库手工创建数据文件,通过控制文件
SQL> alter database create datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006' as    '/oradata/prod/t01.dbf';


Database altered.


SQL> select file_name from dba_data_files;


FILE_NAME
--------------------------------------------------------------------------------
/oradata/prod/system01.dbf
/oradata/prod/sysaux01.dbf
/oradata/prod/undotbs01.dbf
/oradata/prod/users01.dbf
/oradata/prod/test01.dbf
3,备库修改参数,并打开mrp,可以看到数据文件被创建
SQL> alter system set standby_file_management=auto;
System altered.

SQL> alter database recover managed standby database using current logfile disconnect;
Database altered.

SQL> select file_name from dba_data_files;
FILE_NAME
--------------------------------------------------------------------------------
/oradata/prod/system01.dbf
/oradata/prod/sysaux01.dbf
/oradata/prod/undotbs01.dbf
/oradata/prod/users01.dbf
/oradata/prod/test01.dbf
/oradata/prod/t01.dbf










来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29108064/viewspace-2133533/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29108064/viewspace-2133533/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值