In addition, here are two screen shots. The one I get when I log in and click the system connection & the one I get when I pretend to edit the connection, so that you can see my specs. It might help for you to know that last night I installed the sample database examples from Oracle 12c Database Download, onto my machine. I was able to connect to system and make connections to the sample databases "HR" and "OE" without any problem. Then I cut my computer off and went to bed. Waking up today, all the sudden I can't connect to any of the connections without getting the following errors every time. Just wanted to clarify that. It's not off and on that I get the error.
Last night I had to connect to the PDBorcl database on sql plus as user: system /as sysdba and I also modified the tnsnames.ora file to connect to PDBorcl. Am I supposed to do something else once I am done unlocking the HR and OE user and making the successful connections to HR and OE???
1. The screen shot was taken before I had saved the HR and OE connections.
Here is a screen shot of the HR connection to pdborcl that worked last night after modifying the tnsnames.ora file to include the pdborcl item in addition to orcl which is already in there.
2. Yes, I seem to have forgotten that yes HR and OE schemas or users connect to pdborcl diferrently from system as default role does. But clear on it now.
3. I have no idea what a JDBC connection is yet. I'm only in the first exam prep stages, SQL fundamentals which I know from working with Microsoft Access and Oracle Discoverer at work 10 years ago.
4. I just added an item to PDBORCL in addition to ORCL which was and is already in there.
5. Now we are getting to the meat of the problem with your answer in #5 here. I did not know that sqlplus and sqldeveloper do not open the PDBorcl item on start up. Can you give me that command to use in sqlplus to make it always start up in pdborcl while I study for atleast the first exam and just want to follow along with the HR and OE examples of SQL given in the SQL Fundamentals exam guide I am studying? I would be much appreciate and will mark your answer as correct answer AFTER you answer this Question because I am afraid it will close the thread/discussion if I mark it now, but I promise I will if I just get whatever simple command tells Oracle 12c to open pdb or pdborcl on start up every time UNTIL I have read in the second exam prep book what that entails and learn officially.
Oh wait I can get the answer from the link you included. It didn't stand out as a link because it is a really light shade of grey. I will read it and if I have any questions on your answer to other people, I will let you know, but I have a feeling you will answer it sufficiently step by step because you were very nicely organized in your reply to me about the various inconsistencies with my ignorance as a newbie to Oracle. Thank you!
rp0248 and others,
I went step by step (see screenshot left image) and altered/opened the pluggable database that contains HR and OE users/schemas and was even able to see a list of the tables that the HR user can access, but when I go to connect to hr@pdborcl or hr@pdborcl.Carolina.rr.com (I don't know which of the two it is, so please see the image on the top right of the screenshot of the tnsnames.ora file to point me to which to use) I get the error:
TNS No listener
I have included a screen shot of the listener file as well so you know exactly what names I used. Hopefully this is enough to help you help me with how to get around the error that is "TNS No listener".
Any help from anyone would be much appreciated.
I hope you can zoom in on the screen shot so you can help me.
Also, here is a screen shot of what shows on the command prompt when I run lsnrctl status
Also, please remember I was connecting just fine after I installed 12c, as user: system, and immediately following adding the database examples (HR, OE, etc) as user: hr and user:oe. But, the next day, turned on my tablet and can't connect as user system, or user hr, or user oe any more. rp0248 pointed out that the pluggable db that contains the HR and OE users/schema does not open by default, so in trying to follow his steps and those of others referenced in his thread he included a link to, I can open the pluggables and see the HR user's tables, but I cannot connect as user hr. I don't know what has happened to the listener.
and here is a screenshot of the error messages when I try: lsnrctl start
I am such a newbie that this question will make you laugh, but do I need to download a listener or modify the listener.ora file? I have no clue, but I am scouring the threads and will post back if I find an answer to this probably incredibly stupid sounding question!
Still troubleshooting. I read somewhere on the world wide web that I need to re-start my listener.
lsnrctl start doesn't start it, I posted the error /result message in a screenshot.
If it would fix my problem, how do I re-start this using a Windows 8.1 Pro OS.? There is no START menu drop-down in 8.1 which is different from all other older Windows OS. I need to know the exact name of the "program" so I can "click" that "icon" on my START screen.
1 person found this helpful
Where is the services panel so that I can start the listener? That's my most important question. I have windows 8.1 and don't see a section titled services among the apps installed icons.
How would it shutdown? It was working until after I rebooted the tablet after downloading and installing the database examples.zip on oracle.com. I attempted to use the alias pdborcl and it did not connect after a reboot. worked fine immediately after install, just not after reboot.
I found the listener by just typing it in the freaking "magnifying glass search" input box and came up with all the local services. Found the oracle listener, right clicked and started it since it was stopped. It was set on automatic, so I wonder why it didn't restart on its own? Is that what you mean by configuring it to start on its own? Thanks so much!!! Once I restarted the listener, then followed your steps to open the pluggable database, I was able to view and manipulate the HR and OE data and can now follow along in the book and begin to master Oracle.
I'd like to create that trigger you mentioned that will automatically open the pluggable databases on start up, but I cannot seem to locate where that is. I followed and read the 2 links you included, but sadly, cannot find what you are trying to show me. Can you direct me further? I'd appreciate it.
Thanks for the direct link and topic to look under. I found what I need. See pasted text below. But, being a true newbie, only learning SQL Fundamentals so far, I don't know where to put this code or trigger. Can you give me the steps? I tried opening SQL Developer sysdba_connection and opening the triggers tree-file directory, but there is no trigger called open_pdbs. So, exactly where am I supposed to go to put this trigger to run on startup?
The way to achieve this is to use a system trigger on the CDB to start some or all of the PDBs.
CREATE OR REPLACE TRIGGER open_pdbs AFTER STARTUP ON DATABASE BEGIN EXECUTE IMMEDIATE 'ALTER PLUGGABLE DATABASE ALL OPEN'; END open_pdbs; /