1.主庫(kù)添加臨時(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.查看備庫(kù)
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>
--查看備庫(kù)日志
*********************************************************************
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 ADD TEMPFILE
Alternatively, if these temporary tablespaces are no longer
needed, then they can be dropped.
Empty temporary tablespace: TEMP_1
*********************************************************************
解決方法
備庫(kù)直接添加一個(gè)臨時(shí)文件
3.備庫(kù)執(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
重啟備庫(kù),查看告警日志,無(wú)報(bào)錯(cuò)。
小結(jié)
1.主庫(kù)添加臨時(shí)表空間,備庫(kù)數(shù)據(jù)字典存在表空間信息。
2.備庫(kù)dba_temp_files數(shù)據(jù)字典不存在臨時(shí)文件記錄。
3.備庫(kù)open狀態(tài)直接添加一個(gè)臨時(shí)文件即可。
4.ADG的文件管理方式和單機(jī)、RAC管理方式不同,需要大家多去測(cè)試。
創(chuàng)新互聯(lián)建站專注于企業(yè)全網(wǎng)營(yíng)銷推廣、網(wǎng)站重做改版、赫章網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、H5頁(yè)面制作、商城網(wǎng)站制作、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站建設(shè)公司、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為赫章等各大城市提供網(wǎng)站開(kāi)發(fā)制作服務(wù)。