|
12c dg环境测试 db_create_file_dest和db_file_name_convert参数,日志如下:
(1)备库参数查看
SQL> show parameter db_create_file_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string /u01/app/oracle/datafile/
SQL> show parameter db_file_name_convert;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string +DGDATA/SZTECH/, /u01/app/orac
le/oradata/DG_STANDBY/
pdb_file_name_convert string
SQL>
(2)主库创建orclpdb2
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
4 ORCLPDB MOUNTED
SQL> create pluggable database orclpdb2 admin user test identified by test default tablespace users;
Pluggable database created.
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB2 MOUNTED
4 ORCLPDB MOUNTED
SQL> alter system switch logfile;
System altered.
SQL>
(3)查看备库pdb,观察orclpdb2数据文件位置
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB2 MOUNTED
4 ORCLPDB MOUNTED
SQL> select con_id,file#,name from v$datafile;
CON_ID FILE# NAME
---------- ---------- --------------------------------------------------------------------------------------------------------------
1 1 /u01/app/oracle/oradata/DG_STANDBY/datafile/o1_mf_system_dt9nvfy1_.dbf
1 3 /u01/app/oracle/oradata/DG_STANDBY/datafile/o1_mf_sysaux_dt9nw7bh_.dbf
1 4 /u01/app/oracle/oradata/DG_STANDBY/datafile/o1_mf_undotbs1_dt9nwqf9_.dbf
2 5 /u01/app/oracle/oradata/DG_STANDBY/549033777C6D829FE05384E5A8C0DD12/datafile/o1_mf_system_dt9nwtso_.dbf
2 6 /u01/app/oracle/oradata/DG_STANDBY/549033777C6D829FE05384E5A8C0DD12/datafile/o1_mf_sysaux_dt9nx2cg_.dbf
1 7 /u01/app/oracle/oradata/DG_STANDBY/datafile/o1_mf_users_dt9nxkwj_.dbf
2 8 /u01/app/oracle/oradata/DG_STANDBY/549033777C6D829FE05384E5A8C0DD12/datafile/o1_mf_undotbs1_dt9nxmom_.dbf
1 9 /u01/app/oracle/oradata/DG_STANDBY/datafile/o1_mf_undotbs2_dt9nxql2_.dbf
4 54 /u01/app/oracle/oradata/DG_STANDBY/57C9813E82EC6BCFE05384E5A8C01DEE/datafile/o1_mf_system_dt9nxvb3_.dbf
4 55 /u01/app/oracle/oradata/DG_STANDBY/57C9813E82EC6BCFE05384E5A8C01DEE/datafile/o1_mf_sysaux_dt9ny36t_.dbf
4 56 /u01/app/oracle/oradata/DG_STANDBY/57C9813E82EC6BCFE05384E5A8C01DEE/datafile/o1_mf_undotbs1_dt9nylxm_.dbf
4 57 /u01/app/oracle/oradata/DG_STANDBY/57C9813E82EC6BCFE05384E5A8C01DEE/datafile/o1_mf_users_dt9nypdv_.dbf
4 58 /u01/app/oracle/oradata/DG_STANDBY/57C9813E82EC6BCFE05384E5A8C01DEE/datafile/o1_mf_test_dt9nyt32_.dbf
3 98 /u01/app/oracle/datafile/DG_STANDBY/57DB7177F05435FAE05384E5A8C0C484/datafile/system.258.dbf
3 99 /u01/app/oracle/datafile/DG_STANDBY/57DB7177F05435FAE05384E5A8C0C484/datafile/sysaux.264.dbf
3 100 /u01/app/oracle/datafile/DG_STANDBY/57DB7177F05435FAE05384E5A8C0C484/datafile/undotbs1.259.dbf
16 rows selected.
SQL>
测试结果:备库同时设置db_create_file_dest和db_file_name_convert参数,以db_create_file_dest参数为准
|
|