您好,登錄后才能下訂單哦!
1.主庫添加臨時文件
SQL> create temporary tablespace temp_1 tempfile '+datadg' size 10m;
Tablespace created.
SQL> alter system archive log current;
System altered.
col file_name for a50;
set lines 150
select file_name,tablespace_name from dba_temp_files;
FILE_NAME TABLESPACE_NAME
-------------------------------------------------- ------------------------------
+DATADG/ORCL/TEMPFILE/temp.265.954623079 TEMP
+DATADG/ORCL/TEMPFILE/temp_1.605.963692313 TEMP_1
SQL>
2.查看備庫
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY WITH APPLY
SQL> col file_name for a50;
SQL> set lines 150
SQL> select file_name,tablespace_name from dba_temp_files;
FILE_NAME TABLESPACE_NAME
-------------------------------------------------- ------------------------------
+DATADG/ORCLDG/TEMPFILE/temp.406.962961491 TEMP
SQL>
--查看備庫日志
*********************************************************************
WARNING: The following temporary tablespaces contain no files.
This condition can occur when a backup controlfile has
been restored. It may be necessary to add files to these
tablespaces. That can be done using the SQL statement:
ALTER TABLESPACE <tablespace_name> ADD TEMPFILE
Alternatively, if these temporary tablespaces are no longer
needed, then they can be dropped.
Empty temporary tablespace: TEMP_1
*********************************************************************
解決方法
備庫直接添加一個臨時文件
3.備庫執行
SQL> alter tablespace temp_1 add tempfile '+datadg' size 10m;
Tablespace altered.
SQL> col file_name for a50;
SQL> set lines 150
SQL> select file_name,tablespace_name from dba_temp_files;
FILE_NAME TABLESPACE_NAME
-------------------------------------------------- ------------------------------
+DATADG/ORCLDG/TEMPFILE/temp.406.962961491 TEMP
+DATADG/ORCLDG/TEMPFILE/temp_1.342.963694567 TEMP_1
重啟備庫,查看告警日志,無報錯。
小結
1.主庫添加臨時表空間,備庫數據字典存在表空間信息。
2.備庫dba_temp_files數據字典不存在臨時文件記錄。
3.備庫open狀態直接添加一個臨時文件即可。
4.ADG的文件管理方式和單機、RAC管理方式不同,需要大家多去測試。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。