DBMS Tuning & My Life

Posts Tagged ‘12c

How can I connect my pluggable database in oracle 12c.

leave a comment »

I installed oracle 12c a day ago. Oracle 12c has two options of creating a database. One is the non pluggable mode, the other is the pluggable mode. The architecture of non pluggable mode is all same with 11gR2. But, pluggable mode is very different with 11gR2. So, connection method of pluggable database is a little unfamiar with me at first time. The step for connection in 12c is shown bellow.

1. At first, create pluggable database.
create pluggable database my_plug01 admin user my_admin identified by my_admin;
alter pluggable database my_plug01 open;

2. Next, create user in pluggable database.
alter session set container=MY_PLUG01;
create user test identified by test;

3. Regist the pluggable database in tnsnames.ora
$ cd $ORACLE_HOME/network/admin
$ vi tnsnames.ora
MY_PLUG01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME= MY_PLUG01)
)
)

4. Connect!
$ sqlplus test/test@my_plug01

Written by sean70kim

July 2, 2013 at 8:40 am

Posted in Oracle

Tagged with