文档课题:主库添加临时表空间,dg端会同步临时表空间的添加验证.
系统:centos 7.9 64位
数据库:oracle 11.2.0.4 64位
环境:rac (双节点) + dg
主库操作:
SQL> create temporary tablespace temp_test tempfile '+DATA' size 20m;
Tablespace created.
SQL> select tablespace_name,file_name from dba_temp_files;
TABLESPACE_NAME FILE_NAME
------------------------------ --------------------------------------------------
TEMP +DATA/orcl/tempfile/temp.262.1117373987
TEMP +DATA/orcl/tempfile/temp.276.1117483829
TEMP_TEST +DATA/orcl/tempfile/temp_test.278.1117488061
SQL> select tablespace_name,status,contents from dba_tablespaces;
TABLESPACE_NAME STATUS CONTENTS
------------------------------ --------- ---------
SYSTEM ONLINE PERMANENT
SYSAUX ONLINE PERMANENT
UNDOTBS1 ONLINE UNDO
TEMP ONLINE TEMPORARY
UNDOTBS2 ONLINE UNDO
USERS ONLINE PERMANENT
TEMP_TEST ONLINE TEMPORARY
7 rows selected.
备库操作:
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
SQL> select tablespace_name,status,contents from dba_tablespaces;
TABLESPACE_NAME STATUS CONTENTS
------------------------------ --------- ---------
SYSTEM ONLINE PERMANENT
SYSAUX ONLINE PERMANENT
UNDOTBS1 ONLINE UNDO
TEMP ONLINE TEMPORARY
UNDOTBS2 ONLINE UNDO
USERS ONLINE PERMANENT
TEMP_TEST ONLINE TEMPORARY
7 rows selected.
说明:主库新建的临时表空间TEMP_TEST,在备库端可以查询到.
SQL> select tablespace_name,file_name from dba_temp_files;
TABLESPACE_NAME FILE_NAME
------------------------------ --------------------------------------------------
TEMP /u01/app/oracle/oradata/temp.262.1117373987
TEMP /u01/app/oracle/oradata/temp01.dbf
说明:备库端无法查询到TEMP_TEST临时表空间的临时文件.
此时可选择手工给TEMP_TEST添加临时文件.
SQL> alter tablespace temp_test add tempfile '/u01/app/oracle/oradata/temp_test01.dbf' size 20m autoextend on;
Tablespace altered.
SQL> select tablespace_name,file_name from dba_temp_files;
TABLESPACE_NAME FILE_NAME
------------------------------ --------------------------------------------------
TEMP /u01/app/oracle/oradata/temp.262.1117373987
TEMP /u01/app/oracle/oradata/temp01.dbf
TEMP_TEST /u01/app/oracle/oradata/temp_test01.dbf
结论:主库创建临时表空间会修改oracle数据字典,此部分修改会同步到dg端,通过dba_tablespaces视图可查询到.至于新添加的临时表空间中的tempfile,dg端不会自动创建,需要手工添加.