Data Guard 主库创建表空间,备库MRP无法启动


主库

SQL> select name from v$datafile;

NAME
----------------------------
/data/orcl/system01.dbf
/data/orcl/sysaux01.dbf
/data/orcl/undotbs01.dbf
/data/orcl/users01.dbf


备库

SQL> select name from v$datafile;

NAME
-------------------------------------
/data/orcldg/datafile/system01.dbf
/data/orcldg/datafile/sysaux01.dbf
/data/orcldg/datafile/undotbs01.dbf
/data/orcldg/datafile/users01.dbf


主库

create tablespace ceshi1 datafile '/data/orcl/ceshi1.dbf' size 100M autoextend on;


SQL> select name from v$datafile;

NAME
----------------------------
/data/orcl/system01.dbf
/data/orcl/sysaux01.dbf
/data/orcl/undotbs01.dbf
/data/orcl/users01.dbf
/data/orcl/ceshi1.dbf

备库

SQL> select name from v$datafile;

NAME
--------------------------------------
/data/orcldg/datafile/system01.dbf
/data/orcldg/datafile/sysaux01.dbf
/data/orcldg/datafile/undotbs01.dbf
/data/orcldg/datafile/users01.dbf
/data/orcldg/datafile/ceshi1.dbf

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ ONLY WITH APPLY

SQL> SELECT PROCESS FROM V$MANAGED_STANDBY WHERE PROCESS LIKE 'MRP%';

PROCESS
---------
MRP0


ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT =MANUAL SID='*';


主库

SQL> create tablespace ceshi2 datafile '/data/orcl/ceshi2.dbf' size 100M autoextend on;

Tablespace created.

SQL> select name from v$datafile;

NAME
------------------------------
/data/orcl/system01.dbf
/data/orcl/sysaux01.dbf
/data/orcl/undotbs01.dbf
/data/orcl/users01.dbf
/data/orcl/ceshi1.dbf
/data/orcl/ceshi2.dbf

6 rows selected.

备库

SQL> select name from v$datafile;

NAME
-------------------------------------
/data/orcldg/datafile/system01.dbf
/data/orcldg/datafile/sysaux01.dbf
/data/orcldg/datafile/undotbs01.dbf
/data/orcldg/datafile/users01.dbf
/data/orcldg/datafile/ceshi1.dbf
/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00006

6 rows selected.

SQL> select open_mode from v$database;

OPEN_MODE
--------------------
READ ONLY

SQL> SELECT PROCESS FROM V$MANAGED_STANDBY WHERE PROCESS LIKE 'MRP%';

no rows selected

SQL> col VALUE format a30
SQL> select name,value  from v$dataguard_stats;

NAME                             VALUE
-------------------------------- ------------------------------
transport lag                    +00 00:00:00
apply lag                        +00 00:01:42
apply finish time
estimated startup time           15
在$ORACLE_HOME/dbs下生成了一个相应的文件句柄,而实际上该文件并不存在。

[root@0919dg2 ~]# ls /u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00006
ls: cannot access /u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00006: No such file or directory
使用create datafile的方式修复

alter database create datafile '/u01/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00006' as '/data/orcldg/datafile/ceshi2.dbf';

SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT USING CURRENT LOGFILE;

SQL>  select name from v$datafile;

NAME
--------------------------------------
/data/orcldg/datafile/system01.dbf
/data/orcldg/datafile/sysaux01.dbf
/data/orcldg/datafile/undotbs01.dbf
/data/orcldg/datafile/users01.dbf
/data/orcldg/datafile/ceshi1.dbf
/data/orcldg/datafile/ceshi2.dbf

SQL> select name,value  from v$dataguard_stats;

NAME                             VALUE
-------------------------------- ------------------------------
transport lag                    +00 00:00:00
apply lag                        +00 00:00:00
apply finish time
estimated startup time           15


ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT =AUTO SID='*';
















评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值