r system switch logfile;
alter system switch logfile
*
ERROR at line 1:
ORA-16000: database open for read-only access
SQL> alter database recover managed standby database finish force;
alter database recover managed standby database finish force
*
ERROR at line 1:
ORA-00283: recovery session canceled due to errors
ORA-16157: media recovery not allowed following successful FINISH recovery
SQL> alter database commit to switchover to primary;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
MOUNTED
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-30012: undo tablespace 'UNDOTBS1' does not exist or of wrong type
Process ID: 20472
Session ID: 769 Serial number: 3
SQL> create undo tablespace undotbs2 datafile'/u3/undotbs2.dbf' size 10g autoextend off;
create undo tablespace undotbs2 datafile'/u3/undotbs2.dbf' size 10g autoextend off
*
ERROR at line 1:
ORA-01109: database not open
SQL> alter tablespace UNDOTBS1 offline;
alter tablespace UNDOTBS1 offline
*
ERROR at line 1:
ORA-01109: database not open
SQL> create pfile='/u3/pfile.ora' from spfile;
File created.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@FIHSER68 ~]$ vi /u3/pfile.ora -----将undo_tablespace参数删除
[oracle@FIHSER68 ~]$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.4.0 Production on Wed Mar 27 11:57:12 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount pfile='/u3/pfile.ora';
ORACLE instance started.
Total System Global Area 4.2758E+10 bytes
Fixed Size 2262656 bytes
Variable Size 5234493824 bytes
Database Buffers 3.7178E+10 bytes
Redo Buffers 342855680 bytes
SQL> alter database mount;
Database altered.
SQL> alter database open;
Database altered.
SQL> show parameter undo;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS10 ----此为控制文件中记录的undo_tablespace.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> create spfile from pfile='/u3/pfile.ora';
File created.