Early this year Oracle released the 12C developer days VM which you can download from here. If you want a preconfigured 12c database to play with among some other goodies then go ahead and download it. The ova file is almost 6GB in size so may take a while on slow connections.
You’ll need VirtualBox to run the VM which can be downloaded from here for your OS of choice. Its free and pretty easy to get going.
I’ve fired my vm up and was trying to look at the container and pluggable databases when I hit my first hurdle trying to connect to the database using sqlplus.
1 2 3 4 5 6 7 8 |
[oracle@localhost ~]$sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Sun Jul 6 23:24:22 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR: ORA-01017: invalid username/password; logon denied |
I tried to connect again by using the credentials and it worked.
1 2 3 4 5 6 7 8 9 10 11 12 |
[oracle@localhost ~]$sqlplus sys/oracle as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Sun Jul 6 23:30:10 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options PDB1@ORCL> |
Being able to connect with the user id and password gave my the vital clue. As can be seen by the prompt PDB1@ORCL> we are connecting directly to the pluggable database and not the container. I wanted to connect to the container so I can view all pluggable databases.
Looking through the environment settings I noticed the TWO_TASK variable set in .bash_profile. TWO_TASK overrides the ORACLE_SID setting and uses sqlnet to connect.
1 2 |
[oracle@localhost ~]$ grep TWO_TASK .bash_profile export TWO_TASK=pdb1 |
So now all I had to do was unset it and connect.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[oracle@localhost ~]$ export TWO_TASK= [oracle@localhost ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Sun Jul 6 23:36:05 2014 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options CDB$ROOT@ORCL> |
And there you go. Now I’m connected to the container. If you want more information in relation to this multitenant architecture and what these terms pluggable and container database mean then start with the Oracle® Database Concepts 12c Release 1 (12.1) documentation.
my system password expired… and no sqlplus / as sysdba… this is a saviour
Thanks for the post. Just what I was looking for. I’ll add this post to my blog.
Cheers,
Christoph
Thanks for this post, didn’t event know what TWO_TASK was until I read your post. I had the issue but used the password to connect as a workaround. I setup APEX 5, Glassfish, Netbeans, SQL Developer 4.1, Data Modeler 4.1, SQLCL, and I am now ready to play with 12c and APEX.
How does this behave in Windows? Because I am facing the same in Windows and there is no TWO_TASK environment variable set.
In Windows you can “set local=service_name”.
Thank you, thank you, thank you!
I wanted to try the new features in RMAN commands but couldn’t as the oracle instance in the VirtualBox was running as
noarchivelog mode.
All I wanted to do was to change it to run as the archivelog mode and test the new RMAN commands and functions.
Anyway, thank you once again!