标签:data 关键点 ons content 64bit copyright app container smo
解决方式:
在12c之前,传统的startup/shutdown 命令是:
Shutdown Command SHUTDOWN NORMAL SHUTDOWN IMMEDIATE SHUTDOWN ABORT
Startup Command STARTUP STARTUP NOMOUNT STARTUP MOUNT
[oracle@rhel59 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Sat Feb 13 03:45:42 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- orcl SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> alter session set container=pn1; alter session set container=pn1 * ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0 SQL>
[oracle@rhel59 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Sat Feb 13 05:37:18 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> SELECT NAME,OPEN_MODE from v$PDBS; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PN1 READ WRITE PN2 MOUNTED SQL> ALTER SESSION SET CONTAINER=pn1; ------------->>>>关键点 Session altered. SQL> SHUTDOWN IMMEDIATE; Pluggable Database closed. SQL> SELECT NAME,OPEN_MODE from v$PDBS; NAME OPEN_MODE ------------------------------ ---------- PN1 MOUNTED SQL>
[oracle@rhel59 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Sat Feb 13 05:40:10 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options SQL> SELECT NAME,OPEN_MODE from v$PDBS; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PN1 READ WRITE PN2 MOUNTED SQL> alter pluggable database pn1 close;---->>关键点 Pluggable database altered. SQL> SELECT NAME,OPEN_MODE from v$PDBS; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PN1 MOUNTED PN2 MOUNTED SQL>
SQL> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 2 PDB$SEED READ ONLY 3 PN1 MOUNTED 4 PN2 MOUNTED SQL> alter pluggable database pn1 open; Pluggable database altered. SQL> select con_id, name, open_mode from v$pdbs; CON_ID NAME OPEN_MODE ---------- ------------------------------ ---------- 2 PDB$SEED READ ONLY 3 PN1 READ WRITE 4 PN2 MOUNTED SQL> select con_id, name, open_mode,RESTRICTED from v$PDBS; CON_ID NAME OPEN_MODE RES ---------- ------------------------------ ---------- --- 2 PDB$SEED READ ONLY NO 3 PN1 READ WRITE NO 4 PN2 MOUNTED SQL>
SQL> alter pluggable database PN1 open restricted; Pluggable database altered. SQL> SELECT NAME,OPEN_MODE,RESTRICTED from v$PDBS; NAME OPEN_MODE RES ------------------------------ ---------- --- PN1 READ WRITE YES
SQL> alter pluggable database PN1 open FORCE; Pluggable database altered. SQL> SELECT NAME,OPEN_MODE,RESTRICTED from v$PDBS; NAME OPEN_MODE RES ------------------------------ ---------- --- PN1 READ WRITE NO
【翻译自mos文章】怎么startup/shutdown PDB?
标签:data 关键点 ons content 64bit copyright app container smo
原文地址:http://www.cnblogs.com/brucemengbm/p/7089180.html