recently I installed Oracle XE 11g with SQL Developer.
When I first ran it and created a database and a new user, everything worked perfectly - I was able to connect to the database and was able to run queries and scripts. However, when I restart my laptop (for example, the following day), I am unable to connect to my database using that new user I created, as well as unable to use SYS/SYSTEM accounts. I get an error with the code ORA-12505 that states:
"An error was encountered performing the requested operation:
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
Vendor code 12505".
Nothing has changed since I restarted my laptop! I have also Googled the error but I am still unable to solve it. I know the error has something to do with my 'tnsnames.ora' file, but the service_name is correct from what I can tell.
My tnsnames.ora file is as follows:
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Mark-Prescher-Laptop)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) ) EXTPROC_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO) ) ) ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) )