Database Reference
In-Depth Information
One key aspect about using a password file is that this is the mechanism that allows you to use SQL*Plus or
RMAN to connect to a remote database over the network with sys* privileges. For example, if you want to connect to a
user named chaya with a password of heera to a remote database named HATHI with sysdba privileges, you would do
as follows:
$ sqlplus chaya/heera@HATHI as sysdba
Oracle will verify that the username password combination exists in a password file on the remote server that is
associated with the database defined by the HATHI net service name. In this example, Oracle uses the information in a
local tnsnames.ora file to determine the location of the database on the network (host, port, and database).
Using a local tnsnames.ora file is known as the local naming connection method. There are other remote
database name resolution methods, such as easy connect, directory naming, and external naming. See the
Oracle Database Net Services Administrator's Guide for details on how to implement these.
Tip
eaSY CONNeCt
The easy connect method allows you to connect to a remote database without the need of a tnsnames.ora file
(or other methods of resolving the location of the database). if you know the name of the host, server, port, and
service name, you can directly enter those on the command line. The syntax is as follows:
sqlplus username@[//]host[:port][/service_name][:server][/instance_name]
For example, assuming the host name is hesta , the port is 1521, and the service name is O12C , then you can
connect as follows:
$ sqlplus user/pass@hesta:1521/O12C
The easy connect method is handy for situations in which you're troubleshooting connectivity issues or when you
don't have a tnsnames.ora file available (or other ways to resolve the remote connection).
Starting the Database
Starting and stopping your database is a task that you'll perform frequently. To start/stop your database, connect with
a SYSDBA or SYSOPER privileged user account, and issue the STARTUP and SHUTDOWN statements. The following example
uses OS authentication to connect to the database:
$ sqlplus / as sysdba
After you're connected as a privileged account, you can start your database, as follows:
SQL> startup;
 
 
Search WWH ::




Custom Search