OPEN_MODE----------
---------- ------------------------------ ---------- 2
4048821679 PDB$SEED READ
ONLY 3
3313918585 PDB1 MOUNTED 4
3872456618 PDB2 MOUNTED SQL>
alter
PLUGGABLE database
all
open; Pluggable
database
altered. SQL>
select
con_id,dbid,NAME,OPEN_MODE
from
v$pdbs; CON_ID
DBID NAME
OPEN_MODE----------
---------- ------------------------------ ---------- 2
4048821679 PDB$SEED READ
ONLY 3
3313918585 PDB1 READ
WRITE 4
3872456618 PDB2 READ
WRITE SQL>
alter
PLUGGABLE database
all
close; Pluggable
database
altered. SQL>
select
con_id,dbid,NAME,OPEN_MODE
from
v$pdbs; CON_ID
DBID NAME
OPEN_MODE----------
---------- ------------------------------ ---------- 2
4048821679 PDB$SEED READ
ONLY 3
3313918585 PDB1 MOUNTED 4
3872456618 PDB2 MOUNTED SQL>
alter
session set
container=pdb1; Session
altered. SQL>
startupPluggable
Database
opened.SQL>
select
con_id,dbid,NAME,OPEN_MODE
from
v$pdbs; CON_ID
DBID NAME
OPEN_MODE----------
---------- ------------------------------ ---------- 3
3313918585 PDB1 READ
WRITE
pdb的管理可以在cdb中进行也可以在pdb中进行,如果是cdb中进行,需要PLUGGABLE关键字,如果是pdb中直接和普通数据库一样
登录pdb
[oracle@xifenfei
~]$ lsnrctl status LSNRCTL
for
Linux: Version 12.1.0.1.0 - Production on
12-MAY-2013 08:07:02 Copyright
(c) 1991, 2013, Oracle. All
rights reserved. Connecting
to
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xifenfei)(PORT=1521)))STATUS
of
the LISTENER------------------------Alias
LISTENERVersion
TNSLSNR for
Linux: Version 12.1.0.1.0 - ProductionStart
Date
11-MAY-2013 18:30:54Uptime
0 days 13 hr. 36 min.
8 secTrace
Level
offSecurity
ON:
Local
OS AuthenticationSNMP
OFFListener
Parameter File /u01/app/grid/product/12.1/network/admin/listener.oraListener
Log File /u01/app/grid/diag/tnslsnr/xifenfei/listener/alert/log.xmlListening
Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xifenfei)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=xifenfei)(PORT=5500))(Security=(my_wallet_directory=/u01/oracle/12.1/db_1/admin/cdb/xdb_wallet))(Presentation=HTTP)(Session=RAW))Services
Summary...Service
"+ASM"
has 1 instance(s). Instance
"+ASM",
status READY, has 1 handler(s) for
this service...Service
"cdb"
has 1 instance(s). Instance
"cdb",
status READY, has 1 handler(s) for
this service...Service
"cdbXDB"
has 1 instance(s). Instance
"cdb",
status READY, has 1 handler(s) for
this service...Service
"pdb1"
has 1 instance(s). Instance
"cdb",
status READY, has 1 handler(s) for
this service...Service
"pdb2"
has 1 instance(s). Instance
"cdb",
status READY, has 1 handler(s) for
this service...The
command completed successfully[oracle@xifenfei
~]$ tnsping pdb1 TNS
Ping Utility for
Linux: Version 12.1.0.1.0 - Production on
12-MAY-2013 08:07:09 Copyright
(c) 1997, 2013, Oracle. All
rights reserved. Used
parameter files: Used
TNSNAMES adapter to
resolve the aliasAttempting
to