Home arrow Site Administration arrow Page 2 - Oracle Database XE: Initializing and Connecting

Connecting to the Database - Administration

In this third part of a five-part series on Oracle Database XE administration, you will learn about initialization parameters and how to connect to the database. This article is excerpted from chapter 28 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).

  1. Oracle Database XE: Initializing and Connecting
  2. Connecting to the Database
By: Apress Publishing
Rating: starstarstarstarstar / 1
October 07, 2010

print this article



Now that you know the architecture of an Oracle database, your next task is to learn how to connect to the database. We’ll start with the command-line tool that has been around almost as long as the Oracle database itself: SQL*Plus. The Plus part of SQL*Plus defines the extra functionality beyond running a SQL statement and returning the results. Here are a few of the capabilities of SQL*Plus:

  1. Define headers and footers for text-based reports
  2. Rename columns for report output 
  3. Prompt users for a variable substitution when they run a script 
  4. Save query results to a file 
  5. Copy tables between databases using a single command 
  6. Retrieve column names from a table

Most of these SQL*Plus functions have long since been replaced by more elegant methods, as you will see throughout this chapter and the rest of the book. However, you never know when you might have to run a legacy SQL*Plus script that has not yet been rewritten for Oracle Database XE using Application Express.

We cover the other Oracle command-line and GUI utilities later in this chapter in the sections titled “Running SQL Commands Using the XE Home Page” and “Using Oracle-Supplied Utilities.” In this section, we show you how to run SQL*Plus from the command line in Linux and Windows as well as how to run SQL queries from the SQL Commands function accessible via the Oracle Database XE home page.

Since the SQL Commands functionality, available via the Oracle Database XE home page, automatically formats your SQL command output for a Web page, very few of the functions found in the SQL*Plus text-based tool remain in the SQL Commands tool. For example, you can still use theDESCRIBEcommand on a table (to display the columns and datatypes of a table), but you no longer have header and footer commands. For those situations where you want more precise control of your SQL output in a Web form, you use the Application Builder function from the Oracle Database XE home page.

Running SQL*Plus from the Command Line

Using SQL*Plus from the command line is slightly different depending on whether you’re using Linux or Windows. On Linux, you must define some environment variables using a login script or running a predefined script provided with your Oracle Database XE installation. In addition, we show you a couple different ways to start SQL*Plus in both the Linux and Windows environments.

Please check back next week for the fourth part of the series.

>>> More Site Administration Articles          >>> More By Apress Publishing

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates


Dev Shed Tutorial Topics: