文档课题:主库添加temp文件,dg端不会同步增加temp文件的验证.标签:主库,文件,NAME,temp,1024,tablespace,YES,name From: https://blog.51cto.com/u_12991611/5734966
系统:centos 7.9 64位
数据库:oracle 11.2.0.4 64位
环境:rac (双节点) + dg
1、测试temp文件
主库节点1操作:
SQL> col file_name for a50
SQL> select file_name,bytes/1024/1024,autoextensible,tablespace_name from dba_temp_files
FILE_NAME BYTES/1024/1024 AUT TABLESPACE_NAME
-------------------------------------------------- --------------- --- ------------------------------
+DATA/orcl/tempfile/temp.262.1117373987 60 YES TEMP
SQL> alter tablespace temp add tempfile '+data' size 50m autoextend on;
Tablespace altered.
SQL> select file_name,bytes/1024/1024,autoextensible,tablespace_name from dba_temp_files;
FILE_NAME BYTES/1024/1024 AUT TABLESPACE_NAME
-------------------------------------------------- --------------- --- ------------------------------
+DATA/orcl/tempfile/temp.262.1117373987 60 YES TEMP
+DATA/orcl/tempfile/temp.276.1117483829 50 YES TEMP
说明:主库端已成功添加临时文件temp.276.1117483829.
备库操作:
SQL> select file_name,autoextensible,bytes/1024/1024,tablespace_name from dba_temp_files;
FILE_NAME AUT BYTES/1024/1024 TABLESPACE_NAME
-------------------------------------------------- --- --------------- ------------------------------
/u01/app/oracle/oradata/temp.262.1117373987 YES 60 TEMP
小结:备库端并没有相应的增加temp文件.
2、测试非temp文件
主库节点1给users表空间添加数据文件.
SQL> select file_name,autoextensible,bytes/1024/1024,tablespace_name from dba_data_files where tablespace_name='USERS';
FILE_NAME AUT BYTES/1024/1024 TABLESPACE_NAME
-------------------------------------------------- --- --------------- ------------------------------
/u01/app/oracle/oradata/users.264.1117373991 YES 5 USERS
SQL> alter tablespace users add datafile '+data' size 50m autoextend on;
Tablespace altered.
SQL> select file_name,autoextensible,bytes/1024/1024,tablespace_name from dba_data_files where tablespace_name='USERS';
FILE_NAME AUT BYTES/1024/1024 TABLESPACE_NAME
-------------------------------------------------- --- --------------- ------------------------------
/u01/app/oracle/oradata/users.264.1117373991 YES 5 USERS
/u01/app/oracle/oradata/users.277.1117483957 YES 50 USERS
备库查询
SQL> select file_name,autoextensible,bytes/1024/1024,tablespace_name from dba_data_files where tablespace_name='USERS';
FILE_NAME AUT BYTES/1024/1024 TABLESPACE_NAME
-------------------------------------------------- --- --------------- ------------------------------
/u01/app/oracle/oradata/users.264.1117373991 YES 5 USERS
/u01/app/oracle/oradata/users.277.1117483957 YES 50 USERS
小结:备库端相应的增加users.277.1117483957文件.
3、备库日志
2022-10-07 17:02:22.300000 +08:00
Completed: alter database recover managed standby database using current logfile disconnect from session
2022-10-07 20:12:37.513000 +08:00
Recovery created file /u01/app/oracle/oradata/users.277.1117483957
Successfully added datafile 6 to media recovery
Datafile #6: '/u01/app/oracle/oradata/users.277.1117483957'
总结:主库添加tempfile,不会产生redo,因此不会同步到dg端.