What is this Site!!

All about Real time requirements in Orale Stay Tune!!

Friday, December 7, 2007


Accessing Oracle Database



I have a oracle database out on my company's network which I need to access.


1. I have the IP address of where this oracle database is located.

2. I have the name of the database

3. I have username and password

How do I connect to this database. What all do I need to set up the enviroment on my computer to access this database.



You will need a tnsnames file. And you will some tool to connect with, either sqlplus, Toad or other similar products. In your tnsnames file on your machine there must be an entry for that database and ip address or host name. Then you can use one of the tools such as Toad or sqlplus to connect to the db. Login with your user name and password and try to connect in one of those tools or something similar. You can also tnsping the database to make sure you can reach it. on the command line in dos, c:\tnsping ip_address. Then make sure it gives you a return so that you know the db is there. This is just to start out to see if you can reach it.

To access oracle database you need to installed oracle client software i.e. sqlplus or another tool like TOAD, SQL Navigator etc.

SQL*PLUS is the oracle client software ship along with u r oracle Enterprice cd. While Installing oracle select Oracle client it will install sql*plus & sql*net.

After Successful Installation Modify your tnsnames.ora file (resides in ORACLE_HOME/network/adin

dir).


OR


db_alias =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ..db server ip address.. )(PORT = ..db server port...))
)
(CONNECT_DATA =
(SERVICE_NAME = ...db server sid...)
)
)

After these setting use tnsping on command prompt :
tnsping ..db server sid..


If tnsping reply correctly
use sqlplus to connect to database
sqlplus dbuser/dbpassword@db_alias






0 comments: