Logging into ORACLE
From YourSupportStoreWiki
logging in
If you downloaded the package from oracle you will have to set some environmental variables.
This is assuming that you are using 11.2 and you downloaded and installed the sqlplus and instant client from oracles website.
Here is what you can do to get it working.
ORACLE_HOME=/usr/lib/oracle/11.2 export ORACLE_HOME
LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib/ export LD_LIBRARY_PATH
There are many ways to log in clients can be developed using odbc drivers but we are going to focus on oracles sqlplus.
Here is the command and options.
sqlplus [ [<option>] [<logon>] [<start>] ]
<logon> is: (<username>[/<password>][@<connect_identifier>] | /)
[AS SYSDBA | AS SYSOPER] | /NOLOG
that didnt tell us a whole lot so here is a basic overview.
the SID is the databse name the connect identifier can be a combination of the hostname port and SID
so to log in as a user
sqlplus username@alias
or
to log in as god
log into the server and if unix su - oracle
sqlplus '/ as sysdba'
to log into a remote database
sqlplus myusername/mypassword@Host:port/alias

