Connecting to the Database
****Summary of How this page can help you******************

This page contains information about how to log into a database on a unix server from your machine.

To go back to the 50 dba terms for the new dba please click the link.

*********************************************************



How to Connect to a Database on a Unix server?

1)First find out from your colleagues the oracle user and password created by the unix team.You
can use these details to connect to the server.
2)Once you get the userid and password use the tools like Exceed or Reflexion or Putty to connect
to the server. These tools ask for the server name , user id and password. Enter the information and
you will be connected to the server and a new window opens.
3)Once you connect to the server,you have to verify if the ORACLE_SID and ORACLE_HOME
variables are set. These variables are necessary if you want to connect to the database.
4)Lot of DBA's maintain the .profile file. This file contains the variables like ORACLE_SID and
ORACLE_HOME and other important variables necessary for you to smoothly connect to the
database without any errors. This file is normally present in the /home/oracle folder if you log in into
the unix server as the oracle user.If you log in into the server as ora10 then the file is present in
/home/ora10.
5)You can check if the .profile file exists in /home/ora10 by going into the folder and executing the ls
-la command.
ls -la
6)You can also check if the variables have any values by executing the below commands. Make
sure those variables are set to the correct values. The ORACLE_SID should contain your database
name. The ORACLE_HOME should contain the path to the place where you installed oracle.
echo $ORACLE_HOME
echo $ORACLE_SID
7)Let us assume that you logged into the server as the user ora10. Now your user should be part of
the dba group. The first time when the Oracle server is installed on the server the dba has to create a
oracle user normally " oracle" and a dba group called "dba". You can have different names if you
want. This oracle user " oracle" should be part of the "dba" group. Only then you can connect to the
database using " / as sysdba" . Let us also assume that the .profile file exists on your server and
contains all relevant variables for your environment.Ok now you can execute the below command to
log in as sysdba. This means you have all the privileges to manage the database.

sqlplus " / as sysdba "

8)You also have other ways to connect to the database. You can connect as the system user. This
user is created by default when you install oracle. Find out the password for the system user from
your colleagues and then type the below command and press enter.

sqlplus system/password

9)You can also connect to the database from your machine using sqlplus or TOAD. For this you
need the entries from the tnsnames.ora for this database. The tnsnames.ora file can be found in your
$ORACLE_HOME/network/admin folder on the unix server. Copy these entries into the
$ORACLE_HOME/network/admin folder of your machine.



To go back to the
50 dba terms for the new dba please clink the link.