前言:
如今你们对“oracle 无法扩展temp”都比较注重,小伙伴们都需要知道一些“oracle 无法扩展temp”的相关文章。那么小编同时在网摘上汇集了一些关于“oracle 无法扩展temp””的相关文章,希望兄弟们能喜欢,咱们一起来了解一下吧!文档课题:主库添加temp文件,dg端不会同步增加temp文件的验证.
系统:centos7.9 64位
数据库:oracle11.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 fromdba_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;
Tablespacealtered.
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 fromdba_temp_files;
FILE_NAME AUTBYTES/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 fromdba_data_files where tablespace_name='USERS';
FILE_NAME AUTBYTES/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;
Tablespacealtered.
SQL>select file_name,autoextensible,bytes/1024/1024,tablespace_name fromdba_data_files where tablespace_name='USERS';
FILE_NAME AUTBYTES/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 fromdba_data_files where tablespace_name='USERS';
FILE_NAME AUTBYTES/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-0717:02:22.300000 +08:00
Completed:alter database recover managed standby database using current logfiledisconnect from session
2022-10-0720:12:37.513000 +08:00
Recoverycreated file /u01/app/oracle/oradata/users.277.1117483957
Successfullyadded datafile 6 to media recovery
Datafile#6: '/u01/app/oracle/oradata/users.277.1117483957'
总结:主库添加tempfile,不会产生redo,因此不会同步到dg端.
补充说明:主库增加tempfile的大小,备库也不会相应的增加.
SQL>select file_name,bytes/1024/1024,autoextensible,tablespace_name fromdba_temp_files;
FILE_NAME BYTES/1024/1024AUT TABLESPACE_NAME
----------------------------------------------------------------- --- ------------------------------
+DATA/orcl/tempfile/temp.262.1117373987 60 YES TEMP
+DATA/orcl/tempfile/temp.276.1117483829 50 YES TEMP
SQL>select file_name,bytes/1024/1024,autoextensible,tablespace_name fromdba_data_files where tablespace_name='USERS';
FILE_NAME BYTES/1024/1024 AUT TABLESPACE_NAME
----------------------------------------------------------------- --- ------------------------------
+DATA/orcl/datafile/users.264.1117373991 5 YES USERS
+DATA/orcl/datafile/users.277.1117483957 50 YES USERS
SQL>alter database tempfile '+DATA/orcl/tempfile/temp.262.1117373987' resize 100m;
Databasealtered.
SQL>select file_name,bytes/1024/1024,autoextensible,tablespace_name fromdba_temp_files;
FILE_NAME BYTES/1024/1024 AUT TABLESPACE_NAME
----------------------------------------------------------------- --- ------------------------------
+DATA/orcl/tempfile/temp.262.1117373987 100 YES TEMP
+DATA/orcl/tempfile/temp.276.1117483829 50 YES TEMP
备库增加tempfile:
SQL>select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
------------------------------------
PHYSICALSTANDBY READ ONLY WITH APPLY
SQL>alter tablespace temp add tempfile '/u01/app/oracle/oradata/temp01.dbf' size 5mautoextend on;
Tablespacealtered.
SQL>select file_name from dba_temp_files;
FILE_NAME
--------------------------------------------------
/u01/app/oracle/oradata/temp.262.1117373987
/u01/app/oracle/oradata/temp01.dbf
标签: #oracle 无法扩展temp