2.2 Connecting


To proceed from this point forward, you need an Oracle database. There are two basic configurations. One software configuration is to have everything on one machine; that is, the Oracle database and client code can all be on your desktop. An alternative is for your Oracle database to be on a separate host, in which case you're connecting with SQL*Plus to Oracle over a network.

If your Oracle software environment is set up, you're ready to connect and begin executing SQL. If this needs to be done you can begin with installing the Oracle Client CD. This installs SQL*Plus and other utilities on your desktop that allow you to interact with a database on the network. An alternate is to install the Oracle Enterprise CD. This gives you the enterprise software and optionally creates a default database.

For Windows environments, it is strongly recommended that you set up a shortcut and a start-in directory, described in Section 2.1. Once this is done, you can invoke SQL*Plus from the desktop.

When you launch SQL*Plus from Windows, you get a popup window with input fields for a username, password, and host string ” illustrated in Figure 2-3.

Figure 2-3. SQL*Plus Login.

graphics/02fig03.jpg

Once you enter the username, password, and host string you have a permanent point-to-point connection to the database. Once connected, the database is at your service to process everything from database queries, to CREATE table statements, and stored procedure execution.

For UNIX environments, the SQL*Plus program directory, $ORACLE_HOME/bin , must be in your path . In UNIX, you invoke SQL*Plus from the command line by typing the program name followed by an argument string that contains username, password, and host string in the format shown next :

 
  $  sqlplus username/password@host_string 

For example:

 
  $  sqlplus scott/tiger@ora  SQL> _  


Programming Oracle Triggers and Stored Procedures
Programming Oracle Triggers and Stored Procedures (3rd Edition) (Prentice Hall PTR Oracle Series)
ISBN: 0130850330
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Kevin Owens

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net