August 26, 2010

PL/SQL Developer Oracle Database Connectivity to access

To access our local Oracle in PL/SQL Developer, we need to add an entry in TNSNAMES.ORA file.


You can find TNSNAMES.ORA file in oracle installed folder.

 Example path:

D:\oraclexe\app\oracle\product\10.1.0\server\NETWORK\ADMIN\TNSNAMES.ORA

Add and entry in the file as follows

 HOST_XE =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.101.1)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = XE)

    )
  )

 If you are facing any problems, just check the following tnsping in command prompt.


TNSPING:

  • Ping your ip address as in the following example.


C:\Documents and Settings\test>tnsping 192.168.101.1


Output:


TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 26-AUG-2


010 09:27:37



Copyright (c) 1997, 2005, Oracle.  All rights reserved.



Used parameter files:


D:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora



Used HOSTNAME adapter to resolve the alias


Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.101.1)(PORT=1521)))


OK (30 msec)

  • Open PL/SQL Developer and login with your username, password and give database as HOST_XE which you specified in the TNSNAMES.ORA file.


If any problem, please let me know.

No comments:

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com