OracleDataGuard_主库添加数据文件或创建表空间(五)

2014-11-24 09:16:49 · 作者: · 浏览: 11
VERT initialization parameter to convert the path names. 数据库在OMF管理时不要使用以下的步骤,同样,如果裸设备路径不跟主库和备库的一样,使用DB_FILE_NAME_CONVERT初始化参数来转换路径的名称。
8.3.1.2.1 Using the STANDBY_FILE_MANAGEMENT Parameter with Raw Devices

By setting the STANDBY_FILE_MANAGEMENT parameter to AUTO whenever new datafiles are added or dropped on the primary database, corresponding changes are made in the standby database without manual intervention. This is true as long as the standby database is using a file system. If the standby database is using raw devices for datafiles, then the STANDBY_FILE_MANAGEMENT initialization parameter will continue to work, but manual intervention is needed. This manual intervention involves ensuring the raw devices exist before log apply services on the standby database recover the redo data that will create the new datafile.On the primary database, create a new tablespace where the datafiles reside in a raw device. At the same time, create the same raw device on the standby database. For example:

STANDBY_FILE_MANAGEMENT设置为AUTO,无论什么时候在主库上添加或删掉新的数据文件,备库不用人工干预相应的改变即可发生在备库。这是针对于备库为文件系统才行的。如果备库使用裸设备来放数据文件,那么 STANDBY_FILE_MANAGEMENT参数将继续工作,但是手动干预是必须的。这个手动干预包括确定裸设备是否存在在备库上日志应用服务恢复创建新的数据文件的重做日志。在主库上,在裸设备上创建一个新的表空间,同时,在备库创建相同的裸设备,例如:

SQL> CREATE TABLESPACE MTS2 DATAFILE '/dev/raw/raw100' size 1m; Tablespace created. SQL> ALTER SYSTEM SWITCH LOGFILE; System altered.

The standby database automatically adds the datafile as the raw devices exist. The standby alert log shows the following:

备库自动添加数据文件到以存在的裸设备,备用告警之日如下:

Fri Apr 8 09:49:31 2005 Media Recovery Log /u01/MILLER/flash_recovery_area/MTS_STBY/archivelog/2005_04_08/o1_mf_1_7_15ffgt0z_.arc Recovery created file /dev/raw/raw100 Successfully added datafile 6 to media recovery Datafile #6: '/dev/raw/raw100' Media Recovery Waiting for thread 1 sequence 8 (in transit)

However, if the raw device was created on the primary system but not on the standby, then the MRP process will shut down due to file-creation errors. For example, issue the following statements on the primary database:

然而,如果在主库上创建了裸设备而没有在备库上创建裸设备,那么MRP进程会因为文件创建错误而关闭,例如,在主库上发出以下语句:

SQL> CREATE TABLESPACE MTS3 DATAFILE '/dev/raw/raw101' size 1m; Tablespace created. SQL> ALTER SYSTEM SWITCH LOGFILE; System altered.

The standby system does not have the /Dave/raw/raw101 raw device created. The standby alert log shows the following messages when recovering the archive:

备用系统没有创建/dev/raw/raw101这个裸设备,备用告警日志如下:

Fri Apr 8 10:00:22 2005 Media Recovery Log /u01/MILLER/flash_recovery_area/MTS_STBY/archivelog/2005_04_08/o1_mf_1_8_15ffjrov_.arc File #7 added to control file as 'UNNAMED00007'. Originally created as: '/dev/raw/raw101' Recovery was unable to create the file as: '/dev/raw/raw101' MRP0: Background Media Recovery terminated with error 1274 Fri Apr 8 10:00:22 2005 Errors in file /u01/MILLER/MTS/dump/mts_mrp0_21851.trc: ORA-01274: cannot add datafile '/dev/raw/raw101' - file could not be created ORA-01119: error in creating database file '/dev/raw/raw101' ORA-27041: unable to open file Linux Error: 13: Permission denied Additional information: 1 Some recovered datafiles maybe left media fuzzy Media recovery may continue but open resetlogs may fail Fri Apr 8 10:00:22 2005 Errors in file /u01/MILLER/MTS/dump/mts_mrp0_21851.trc: ORA-01274: cannot add datafile '/dev/raw/raw101' - file could not be created ORA-01119: error in creating database file '