SET UP TNSNAMES.ORA
Something that we need to know about oracle 12C, there are PDB and CBD, we should know, which one that we log in when connect using our sqlplus or toad.
This is very confusing for me, but fortunately, there is google, i just search for this solution for 2 weeks and then
*tada*
http://halimdba.blogspot.com/2013/07/ora-65096-invalid-common-user-or-role.html
http://dbaharrison.blogspot.com/2013/07/create-simple-user-in-12c-pluggable.html
http://www.oracle-base.com/articles/12c/multitenant-connecting-to-cdb-and-pdb-12cr1.php
http://www.pythian.com/blog/my-first-five-minutes-with-oracle-database-12c/
*tada*
http://www.oracle-base.com/articles/12c/multitenant-configure-instance-parameters-of-cdb-and-pdb-12cr1.php
I found it....
In earliear version of Oracle Database, we just log in as usual and can create user with common sintaks "CREATE USER TEST IDENTIFIED BY test".
first, before you start, you need to know, where session you are in.
so
to in your PDB session, you need to alter the session container
But this is so complicated when you need to alter session to starting what you want to do..
so we can define another service name that we put in tnsnames.ora. So if you want to go PDB, you just log in using that services names.
first we should know all of our services.
From the list beside, i have services 'pdbo' for my pluggable database 'pdbo'.
Next step, open your LSNRCTL.exe at
<<oracle_home>>\BIN\LNSTRCTL.EXE
and now, you can connect just using the new services name in tnsnames.ora.
you can start using as usual..
This is very confusing for me, but fortunately, there is google, i just search for this solution for 2 weeks and then
*tada*
http://halimdba.blogspot.com/2013/07/ora-65096-invalid-common-user-or-role.html
http://dbaharrison.blogspot.com/2013/07/create-simple-user-in-12c-pluggable.html
http://www.oracle-base.com/articles/12c/multitenant-connecting-to-cdb-and-pdb-12cr1.php
http://www.pythian.com/blog/my-first-five-minutes-with-oracle-database-12c/
*tada*
http://www.oracle-base.com/articles/12c/multitenant-configure-instance-parameters-of-cdb-and-pdb-12cr1.php
I found it....
In earliear version of Oracle Database, we just log in as usual and can create user with common sintaks "CREATE USER TEST IDENTIFIED BY test".
But when you connect in 12C, the sintaks will return error ORA-65096: invalid common user or role name
this is because you are create common user, and for common user, you need C## in front of the username for example:
"CREATE USER C##TEST IDENTIFIED BY test"
first, before you start, you need to know, where session you are in.
so
Check session |
Alter the session |
so we can define another service name that we put in tnsnames.ora. So if you want to go PDB, you just log in using that services names.
first we should know all of our services.
All Services that Exists |
From the list beside, i have services 'pdbo' for my pluggable database 'pdbo'.
Next step, open your LSNRCTL.exe at
<<oracle_home>>\BIN\LNSTRCTL.EXE
see the list of all services in our database. As you see, there is a service name pdbo for my instance O. and you just need to add new services pbdo in tnsnames.ora
tnsnames.ora |
connect with new services |
Comments
Post a Comment