O'Reilly logo

Oracle SQL*Plus: The Definitive Guide, 2nd Edition by Jonathan Gennick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting Command-Line SQL*Plus

You’d think that starting SQL*Plus and connecting to a database would be a simple affair to explain, but it isn’t. There are many permutations available for entering your username and password, and for specifying the target database. You’ve seen a couple of them already in Chapter 1. I won’t cover every possibility in this section, only those permutations that are most useful.

Connecting to a Default Database

Perhaps the simplest way to start SQL*Plus is to issue the sqlplus command and let SQL*Plus prompt you for your username and password:

oracle@gennick02:~> sqlplus

SQL*Plus: Release 10.1.0.2.0 - Production on Wed Apr 21 20:17:47 2004

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

Enter user-name: gennick
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>

This approach works well if you’re connecting to a default database, usually running on the same machine that you are logged into. SQL*Plus does not echo your password to the display, protecting you from those who would steal your password by looking over your shoulder as you type.

Tip

Prior to Oracle8i Database, SQL*Plus executables under Windows were named plus80 (Oracle8), plus73 (Oracle7.3), plus72 (Oracle7.2), and plus71 (Oracle7.1).

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required