Showing posts with label connections. Show all posts
Showing posts with label connections. Show all posts

Sunday, May 23, 2010

SQLDeveloper - Connection parameters



Here is how I am able to connect to the database using SQLDeveloper, without using TNSNAMES option.
Note:  All the notes have been written for *nix (Linux/UNIX) OS versions
Leave the connection Type as "Basic"
 
 Determine the Hostname, port and global database name as mentioned below:

  • open a terminal 
  • type lsnrctl (the prompt will change to LSNRCTL>)
  • type show pid
  • This will display host (which you will enter in hostname) and the port values.
  • Next determine service name by running the following SQL:
  • SELECT VALUE AS "Service Name" FROM v$parameter WHERE name = 'service_names'
  • Enter value  into Service Name
  • Click on Test and ensure that you are able to connect. 
  • Finally click on save to save it in the connection list.


Monday, May 3, 2010

SO Exception, TNS-12514 and other errors



My Windows 7 was giving troubles of late and was crashing (Blue-screen-of-death) almost 3/4 times daily (Need to figure out that one at some other point of time). Naturally, the Linux OS installed in the VMware, also started giving problems. For the last two days, I could not connect to Oracle from SQLDeveloper. First I got ORA-12541 (Screen -1), then, ORA-12514 error and lastly, a "SO Exception".

Lastly, I logged into SQLPLUS as sys and ran the following command:-
Show parameter local listener (Screen -02).

Bingo! I found that the port number was wrong. Instead of 25000,my tnsnames and listener was set at 3801. Modified the listener.ora and tnsnames.ora and SQLDeveloper was able to connect again (Screen -03)