create temporary tablespace temp_1 tempfile +datadg size 10m; Tablespace created. SQL> alter system archive log current; ..."/>
您好,登錄后才能下訂單哦!
1.主庫添加臨時(shí)文件
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
*********************************************************************
解決方法
備庫直接添加一個(gè)臨時(shí)文件
3.備庫執(zhí)行
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
重啟備庫,查看告警日志,無報(bào)錯(cuò)。
小結(jié)
1.主庫添加臨時(shí)表空間,備庫數(shù)據(jù)字典存在表空間信息。
2.備庫dba_temp_files數(shù)據(jù)字典不存在臨時(shí)文件記錄。
3.備庫open狀態(tài)直接添加一個(gè)臨時(shí)文件即可。
4.ADG的文件管理方式和單機(jī)、RAC管理方式不同,需要大家多去測試。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。