NID修改多租户dbname。需要重建PDB$SEED?
In this Document
APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.
SYMPTOMS
Trying to use NID to change DBNAME in multitenant environment crashes with NID-00137 for PDB$SEED tempfile:
+DATA/ORCL/0752067436E80060E0530AF11C353F16/DATAFILE/pdbseed_temp012017-07-13_02-49-30-pm.db (2), error: 4
NID-00137: All datafiles that are not dropped should be readable.
CHANGES
CAUSE
PDB$SEED tempfile is missing:
ORA-01110: data file 202: '+DATA/ORCL/0752067436E80060E0530AF11C353F16/DATAFILE/pdbseed_temp012017-07-13_02-49-30-pm.dbf'
ORA-01157: cannot identify/lock data file 202 - see DBWR trace file
ORA-01110: data file 202: '+DATA/ORCL/0752067436E80060E0530AF11C353F16/DATAFILE/pdbseed_temp012017-07-13_02-49-30-pm.dbf'
*** Error 1157 in open/read file # 202 ***
SOLUTION
Recreate PDB$SEED tempfile:
alter session set container = PDB$SEED;
select file_name, tablespace_name, bytes, blocks from dba_temp_files;
alter database tempfile '+DATA/ORCL/0752067436E80060E0530AF11C353F16/DATAFILE/pdbseed_temp012017-07-13_02-49-30-pm.dbf' drop including datafiles;
2) Create new PDB$SEED tempfile
ALTER TABLESPACE TEMP ADD TEMPFILE '+DATA' SIZE 20971520 AUTOEXTEND OFF; << use size in bytes from previous query in #1
3) query to verify if the new PDB$SEED tempfile was recreated:
SELECT TABLESPACE_NAME, AUTOEXTENSIBLE, STATUS, FILE_NAME, bytes/(1024*1024) MB FROM DBA_TEMP_FILES;
浙公网安备 33010602011771号