SQL*Plus User's Guide and Reference
Release 9.0.1

Part Number A88827-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Accessing SQL Databases, 2 of 5


Connecting to the Default Database

To access data in a given database, you must first connect to the database. When you start SQL*Plus, you normally connect to your default Oracle database under the username and password you enter while starting. Once you have logged in, you can connect under a different username with the SQL*Plus CONNECT command. The username and password must be valid for the database. See Username and Password in Chapter 1 for a list of default user logins created during installation.

For example, to connect the username TODD to the default database using the password FOX, you could enter

Keyboard icon
CONNECT TODD/FOX

If you omit the username and password, SQL*Plus prompts you for them. You also have the option of typing only the username following CONNECT and omitting the password (SQL*Plus then prompts for the password). Because CONNECT first disconnects you from your current database, you will be left unconnected to any database if you use an invalid username and password in your CONNECT command.

If you log on or connect as a user whose account has expired, SQL*Plus prompts you to change your password before you can connect.

If an account is locked, a message is displayed and connection as this user is not permitted until the account is unlocked by your DBA.

You can disconnect the username currently connected to Oracle without leaving SQL*Plus by entering the SQL*Plus command DISCONNECT at the SQL*Plus command prompt.

The default database is configured at an operating system level by setting operating system environment variables, symbols or, possibly, by editing an Oracle specific configuration file. Refer to your Oracle documentation for your operating system for more information.


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback