Connecting
to the root of a container database is the same as that of any
previous database instance. On the database server you can use OS
Authentication.
[oracle@vmdb12c
~]$ sqlplus / as sysdba
SQL*Plus:
Release 12.1.0.2.0 Production on Mon Nov 30 11:38:44 2015
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> show con_name
CON_NAME
——————————
CDB$ROOT
——————————
CDB$ROOT
The
V$SERVICES views can be used to display available services from the
database.
SQL> select name,pdb from v$services order by 2;
NAME
PDB
——————– ———-
zwcXDB CDB$ROOT
SYS$BACKGROUND CDB$ROOT
SYS$USERS CDB$ROOT
ptest12c PTEST12C
ptest12c_1 PTEST12C_1
ptest12c_2 PTEST12C_2
——————– ———-
zwcXDB CDB$ROOT
SYS$BACKGROUND CDB$ROOT
SYS$USERS CDB$ROOT
ptest12c PTEST12C
ptest12c_1 PTEST12C_1
ptest12c_2 PTEST12C_2
6
rows selected.
[oracle@vmdb12c ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 01-DEC-2015 12:17:38
Copyright
(c) 1991, 2014, Oracle. All rights reserved.
Connecting
to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS
of the LISTENER
------------------------
Alias
LISTENER_TEST12C
Version
TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start
Date 16-NOV-2015 18:02:53
Uptime
14 days 18 hr. 14 min. 45 sec
Trace
Level off
Security
ON: Local OS Authentication
SNMP
OFF
Listener
Parameter File
/data/amit/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener
Log File
/data/amit/app/oracle/diag/tnslsnr/bigdata2/listener_test12c/alert/log.xml
Listening
Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost.localdomain)(PORT=5500))(Security=(my_wallet_directory=/data/amit/app/oracle/admin/test12c/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services
Summary...
Service
"PLSExtProc" has 1 instance(s).
Instance
"PLSExtProc", status UNKNOWN, has 1 handler(s) for this
service...
Service
"PTEST12C" has 2 instance(s).
Instance
"PTEST12C", status UNKNOWN, has 1 handler(s) for this
service...
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Service
"ptest12c_1" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Service
"ptest12c_2" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Service
"ptest12c_3" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Service
"test12c" has 2 instance(s).
Instance
"test12c", status UNKNOWN, has 1 handler(s) for this
service...
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Service
"test12cXDB" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
The
command completed successfully
[oracle@vmdb12c
~]$ lsnrctl service
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 01-DEC-2015 12:19:05
Copyright
(c) 1991, 2014, Oracle. All rights reserved.
Connecting
to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services
Summary...
Service
"PLSExtProc" has 1 instance(s).
Instance
"PLSExtProc", status UNKNOWN, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:0 refused:0
LOCAL
SERVER
Service
"PTEST12C" has 2 instance(s).
Instance
"PTEST12C", status UNKNOWN, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:71 refused:0
LOCAL
SERVER
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:1 refused:0 state:ready
LOCAL
SERVER
Service
"ptest12c_1" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:1 refused:0 state:ready
LOCAL
SERVER
Service
"ptest12c_2" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:1 refused:0 state:ready
LOCAL
SERVER
Service
"ptest12c_3" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:1 refused:0 state:ready
LOCAL
SERVER
Service
"test12c" has 2 instance(s).
Instance
"test12c", status UNKNOWN, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:10 refused:0
LOCAL
SERVER
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Handler(s):
"DEDICATED"
established:1 refused:0 state:ready
LOCAL
SERVER
Service
"test12cXDB" has 1 instance(s).
Instance
"test12c", status READY, has 1 handler(s) for this
service...
Handler(s):
.......
Connections using services are unchanged from previous versions.
easy connect
[oracle@vmdb12c ~]$ sqlplus system/oracle123@202.137.235.171:1521/PTEST12C_2
SQL*Plus:
Release 12.1.0.2.0 Production on Tue Dec 1 15:24:39 2015
Copyright
(c) 1982, 2014, Oracle. All rights reserved.
Last
Successful login time: Tue Dec 01 2015 13:00:19 +05:30
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>
show con_name
CON_NAME
------------------------------
PTEST12C_2
[oracle@vmdb12c
~]$ sqlplus system/oracle123@202.137.235.171:1521/PTEST12C_3
SQL*Plus:
Release 12.1.0.2.0 Production on Tue Dec 1 15:24:39 2015
Copyright
(c) 1982, 2014, Oracle. All rights reserved.
Last
Successful login time: Tue Dec 01 2015 13:00:19 +05:30
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 optionsSQL> show con_name
CON_NAME
------------------------------
PTEST12C_3
tnsnames.ora
[oracle@vmdb12c ~]$sqlplus system/oracle@PTEST12C_3
[oracle@vmdb12c ~]$sqlplus system/oracle@PTEST12C_3
SQL*Plus:
Release 12.1.0.2.0 Production on Tue Dec 1 15:47:25 2015
Copyright
(c) 1982, 2014, Oracle. All rights reserved.
Last
Successful login time: Tue Dec 01 2015 15:24:39 +05:30
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>
show con_name
CON_NAME
------------------------------
PTEST12C_3
[oracle@vmdb12c
~]$sqlplus
system/oracle@PTEST12C_1
SQL*Plus:
Release 12.1.0.2.0 Production on Tue Dec 1 15:47:25 2015
Copyright
(c) 1982, 2014, Oracle. All rights reserved.
Last
Successful login time: Tue Dec 01 2015 15:24:39 +05:30
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>
show con_name
CON_NAME
------------------------------
PTEST12C_1
tnsnames.ora
TEST12C
=
(DESCRIPTION
=
(ADDRESS
= (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA
=
(SERVER
= DEDICATED)
(SERVICE_NAME
= test12c)
)
)
PTEST12C
=
(DESCRIPTION
=
(ADDRESS
= (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA
=
(SERVER
= DEDICATED)
(SERVICE_NAME
= PTEST12C)
)
)
PTEST12C_1
=
(DESCRIPTION
=
(ADDRESS
= (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA
=
(SERVER
= DEDICATED)
(SERVICE_NAME
= PTEST12C_1)
)
)
PTEST12C_3
=
(DESCRIPTION
=
(ADDRESS
= (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA
=
(SERVER
= DEDICATED)
(SERVICE_NAME
= PTEST12C_3)
)
)
LISTENER_TEST12C
=
(ADDRESS
= (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
[oracle@vmdb12c ~]$ sqlplus "/ as sysdba"
SQL*Plus:
Release 12.1.0.2.0 Production on Tue Dec 1 15:53:10 2015
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> alter session set container=PTEST12C_1;
Session altered.
SQL> show pdbs
CON_ID
CON_NAME OPEN MODE RESTRICTED
----------
------------------------------ ---------- ----------
4
PTEST12C_1 READ WRITE NO
SQL>
alter session set container=PTEST12C_2;
Session altered.
SQL> show pdbs
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
5 PTEST12C_2 READ WRITE NO
SQL>
alter session set container=cdb$root;
Session altered.
SQL> show pdbs
Session altered.
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2
PDB$SEED READ ONLY NO
4 PTEST12C_1 READ WRITE NO
5 PTEST12C_2 READ WRITE NO
6 PTEST12C_3 READ WRITE NO
SQL>
select sys_context('USERENV','CON_NAME') from dual;
SQL> alter session set container=PTEST12C_1;
SQL> select sys_context('USERENV','CON_NAME') from dual;
SYS_CONTEXT('USERENV','CON_NAME')
——————————————————————————–
CDB$ROOT
——————————————————————————–
CDB$ROOT
SQL> alter session set container=PTEST12C_1;
Session
altered.
SQL> select sys_context('USERENV','CON_NAME') from dual;
SYS_CONTEXT('USERENV','CON_NAME')
——————————————————————————–
PTEST12C_1
——————————————————————————–
PTEST12C_1
I
hope this article helped you. Your
suggestions/feedback are most welcome.
Keep learning... Have a great day!!!
Keep learning... Have a great day!!!
Excellent Blog very imperative good content, this article is useful to beginners and real time
ReplyDeleteemployees.Thank u for sharing...
Oracle ADF Online Training
Oracle DBA Online Training
Oracle APPS Online Training
sharing knowledge is the ultimate key of success, thanks a lot for providing online material.
ReplyDeleteThanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital informationOracle DBA Training in Chennai
ReplyDeleteYour blog is so nice, and the article is very good it helps to so many people.Oracle DBA Training in Hyderabad
ReplyDeleteNice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision.
ReplyDeleteNice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision.
Click here:Nice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision.
angularjs6 Training in Chennai
Click here:
Microsoft azure training in chennai
Click here:
angularjs6 Training in Chennai
Click here:
angularjs Training in online
Well researched article and I appreciate this. The blog is subscribed and will see new topics soon.
ReplyDeleteClick here:
Microsoft azure training in marathahalli
Click here:
Microsoft azure training in bangalore
Click here:
Microsoft azure training in pune
Great post! I am actually getting ready to across this information, It’s very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
ReplyDeleteData science training in Bangalore
Data Science training in marathahalli
Data Science training in btm
Data Science training in rajaji nagar
Data Science training in chennai
Data Science training in kalyan nagar
Data Science training in electronic city
Data Science training in USA
This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me..
ReplyDeleteJava Training in Pune
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeletejava training in chennai | java training in bangalore
java training in tambaram | java training in velachery
java training in omr | oracle training in chennai
I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.
ReplyDeletejava training in annanagar | java training in chennai
java training in marathahalli | java training in btm layout
java training in rajaji nagar | java training in jayanagar
java training in chennai
Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
ReplyDeleteDevops Training in Chennai
Devops Training in Bangalore
Devops Training in pune
Greetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.
ReplyDeleteAWS Training in Bangalore | Amazon Web Services Training in Bangalore
Amazon Web Services Training in Pune | Best AWS Training in Pune
AWS Online Training | Online AWS Certification Course - Gangboard
Selenium Training in Chennai | Best Selenium Training in Chennai
Selenium Training in Bangalore | Best Selenium Training in Bangalore
Really great post, I simply unearthed your site and needed to say that I have truly appreciated perusing your blog entries.
ReplyDeletepython training in rajajinagar
Python training in btm
Python training in usa
Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..
ReplyDeletepython training in velachery
python training institute in chennai
Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up.
ReplyDeleteDevops Training courses
Devops Training in Bangalore
Devops Training in pune
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.
ReplyDeleteData Science course in rajaji nagar | Data Science with Python course in chenni
Data Science course in electronic city | Data Science course in USA
Data science course in pune | Data science course in kalyan nagar
Thanks for sharing such a useful post and i hope it’s useful to many people for developing their skill .Thanks a lot.
ReplyDeleteaws online training
aws training in hyderabad
aws online training in hyderabad
Very nice to read this post
ReplyDeleteazure certification training in chennai
Informative post, continue sharing more like this..Oracle DBA Training Online
ReplyDeleteExcellent and useful blog admin, I would like to read more about this topic.
ReplyDeleteAzure Training in Chennai
Microsoft Azure Training in Chennai
R Programming Training in Chennai
Big Data Analytics Courses in Chennai
Data Science course in Chennai
RPA course in Chennai
Azure Training in OMR
Azure Training in Porur
This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here
ReplyDeleteThis is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here
This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here
informatica mdm online training
apache spark online training
angularjs online training
devops online training
aws online training
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Python online training
uipath online training
And indeed, I’m just always astounded concerning the remarkable things served by you. Some four facts on this page are undeniably the most effective I’ve had.
ReplyDeleteData science Course Training in Chennai | No.1 Data Science Training in Chennai
RPA Course Training in Chennai | No.1 RPA Training in Chennai
I inspired a lot by seeing your website.
ReplyDeleteAngularJS training in chennai | AngularJS training in anna nagar | AngularJS training in omr | AngularJS training in porur | AngularJS training in tambaram | AngularJS training in velachery
When I tried to implement recyclerview it shows a run time error like this.I did n't find any problem in mycode,thansk
ReplyDeleteAi & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai
very nice post!!!
ReplyDeleteandroid training in chennai
android online training in chennai
android training in bangalore
android training in hyderabad
android Training in coimbatore
android training
android online training
The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this. This is good information and really helpful for the people who need information about this.
ReplyDeleteSalesforce Training in Chennai
Salesforce Online Training in Chennai
Salesforce Training in Bangalore
Salesforce Training in Hyderabad
salesforce training in ameerpet
Salesforce Training in Pune
Salesforce Online Training
Salesforce Training
This is really an awesome post, thanks for it. Keep adding more information to this. oracle training in chennai
ReplyDeleteThose guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp a great deal more around this condition. and I could assume you are an expert on this subject. Same as your blog i found another one Oracle Taleo .Actually I was looking for the same information on internet for Oracle Taleo and came across your blog. I am impressed by the information that you have on this blog. Thanks a million and please keep up the gratifying work.
ReplyDeleteI'm glad to report that reading the post was interesting. Your article provided new information to me. You are performing admirably.
ReplyDeletePython Fullstack Course Hyderabad
Thanks for sharing such a useful post and i hope it’s useful to many people for developing their skill .Thanks a lot.
ReplyDeletejava fullstack training in hyderabad
very nice post....
ReplyDeleteDot net training in hyderabad