Managing Users  «Prev  Next»

Lesson 11 Connecting from a client
Objective Connect to an instance from a client PC.

Connecting from client in Oracle

Assuming that everything has worked for you so far, you are now ready to connect to your database from your client PC. If you are doing all this on one machine the process is exactly the same. Up until now, you have always used the following, simple form of the CONNECT command to connect to a database from the same machine:

CONNECT INTERNAL

The more general form of the command, and the one that you need to use when connecting remotely, is:
CONNECT username/password@service

The username and password identify you to Oracle as a valid user.
Connecting Oracle Client
It is possible to connect remotely as the internal user, but you will not be able to do that until you have created a password file.
For now, you can connect as the user named system. This is the default DBA username that you always get when you create a new database. You should know the password, because you set it yourself back in Course 1, Database Creation and Architecture, just after creating your database. The service[1] parameter in the above example corresponds to a Oracle Net service name entry in your tnsnames.ora file. Thus, to connect to your coin database as the user system, using the default password of manager, you would issue this command from Server Manager:
CONNECT system/manager@coin

Go through the following Slide Show to see how this works using the COIN database as an example.

Now for a trip down memory lane.The Oracle Server Manager has been deprecated since Oracle 9i.
Run the same commands listed below using SQL* Plus or SQL Developer.

Connect PC to Database

Connect Oracle Net Service - Exercise

Now that you have seen it, go ahead and try it yourself. Click on the Exercise link below to connect to your COIN service.
Connect Oracle Net Service - Exercise

[1]service: NT.A service under Windows NT is software that runs in the background, independently of any logged on user.
A Oracle Net service is a usually a database instance, but could be some other software, that is accessible via Oracle Network Services.