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
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/