banner



How To Install Sqlplus On Windows 10

7/83

SQL*Plus Quick Start

These instructions are to enable yous to login and connect to a database after you have installed SQL*Plus. Yous can connect to the default database you created during installation, or to some other existing Oracle database.

  • SQL*Plus Resources

  • SQL*Plus Overview

  • SQL*Plus Prerequisites

  • Starting SQL*Plus Command-line

  • Starting SQL*Plus Windows GUI

  • Starting iSQL*Plus

  • Starting SQL*Plus Instant Client

  • Connecting to a Different Database

  • Sample Schemas and SQL*Plus

  • Running your start Query

  • Exiting SQL*Plus

SQL*Plus Resource

  • SQL*Plus on the Oracle Engineering science Network at http://www.oracle.com/technology/tech/sql_plus/.

  • SQL*Plus Word Forum at http://www.oracle.com/forums/.

  • Oracle Documentation Library at http://www.oracle.com/technology/documentation.

  • SQL*Plus Product and Documentation feedback by emailing sqlplus@oracle.com.

SQL*Plus Overview

SQL*Plus is an interactive and batch query tool that is installed with every Oracle Database installation. It has a command-line user interface, a Windows Graphical User Interface (GUI) and the iSQL*Plus spider web-based user interface.

There is likewise the SQL*Plus Instant Customer which is a stand-lone command-line interface bachelor on platforms that support the OCI Instant Client. SQL*Plus Instant Customer connects to whatever available Oracle database, but does not require its own Oracle database installation. See the Oracle Call Interface Programmer's Guide for more information on the OCI Instant Client.

SQL*Plus has its own commands and surround, and it provides access to the Oracle Database. It enables you lot to enter and execute SQL, PL/SQL, SQL*Plus and operating organisation commands to perform the post-obit:

  • Format, perform calculations on, shop, and impress from query results

  • Examine tabular array and object definitions

  • Develop and run batch scripts

  • Perform database administration

You can use SQL*Plus to generate reports interactively, to generate reports as batch processes, and to output the results to text file, to screen, or to HTML file for browsing on the Internet. You tin can generate reports dynamically using the HTML output facility of SQL*Plus, or using the dynamic reporting capability of iSQL*Plus to run a script from a web page.

Connections to an Oracle7 database from SQL*Plus 10.2 are not supported.

Who Tin can Utilize SQL*Plus

The SQL*Plus, SQL, and PL/SQL control languages are powerful enough to serve the needs of users with some database experience, notwithstanding straightforward enough for new users who are only learning to work with the Oracle Database.

The SQL*Plus language is easy to use. For example, to rename a column labelled LAST_NAME with the heading "Family unit Name", enter the command:

Column LAST_NAME HEADING 'Family Name'        

Similarly, to listing cavalcade definitions for the EMPLOYEES table, enter the command:

Describe EMPLOYEES        

How Can I Learn SQL*Plus

There are several sources available to aid you lot to learn SQL*Plus:

  • Part II of this Guide, Using SQL*Plus

  • Help for SQL*Plus, Command-line and iSQL*Plus online assist

  • Oracle Database 10g: SQL Fundamentals

    An instructor-led course run by Oracle. This is a comprehensive hands-on class taking the educatee through all aspects of using SQL*Plus and iSQL*Plus to access Oracle Database.

  • More than Oracle Database 10g Preparation

    To find more useful Oracle courses, go to http://www.oracle.com/pedagogy.

How to Use the SQL*Plus Guide

This guide provides information near SQL*Plus that applies to all operating systems. It also includes some Windows and UNIX specific information, for example, the Windows Graphical User Interface. Some aspects of SQL*Plus differ on each operating system. Such operating system specific details are covered in the Oracle Database Installation Guide provided for your system. Use these operating arrangement specific guides in conjunction with this SQL*Plus User'south Guide and Reference.

Throughout this guide, examples showing how to enter commands employ a common command syntax and a common set of sample tables. The tables are described in "Sample Schemas and SQL*Plus".

SQL*Plus Control-line and Windows GUI Compages

SQL*Plus command-line and the Windows GUI apply a 2-tier model comprising:

  • Client (control-line user interface).

  • Database (Oracle Database).

The 2 tiers may be on the aforementioned machine.

SQL*Plus Client

The control-line user interface is the character based terminal implementation. The Windows GUI is an alternate user interface available in Windows installations.

Oracle Database

Oracle Database Net components provide advice between the SQL*Plus Client and Oracle Database.

iSQL*Plus Compages

iSQL*Plus is a browser-based interface which uses the SQL*Plus processing engine in a three-tier model comprising:

  • Customer (Web browser).

  • Middle tier (Application Server).

  • Database (Oracle Database).

Description of arch.gif follows
Clarification of the analogy arch.gif

The iSQL*Plus Server is installed on the same machine as the Application Server. The client may or may not as well be on this machine. The middle tier coordinates interactions and resource between the client tier and the database tier. The database is Oracle8i, Oracle9i or Oracle Database xyard accessed through Oracle Cyberspace.

Spider web Browser

The iSQL*Plus user interface comprises web pages served to your web browser through the Internet or your intranet. There is no installation or configuration required for the iSQL*Plus user interface. Y'all only need to know the URL of the Application Server to access an available Oracle database.

Awarding Server

The Application Server is installed when Oracle Database is installed.

The centre tier contains a Java2 Enterprise Edition (J2EE) compliant application server. It uses Oracle Containers for Coffee (OC4J) as the server engine. The Application Server enables communication and hallmark between the iSQL*Plus user interface and Oracle Database.

Oracle Database

Oracle Cyberspace components provide advice between the iSQL*Plus Application Server and Oracle Database in the same way as for a customer server installation of Oracle Database.

SQL*Plus Prerequisites

SQL*Plus is a component of Oracle Database. SQL*Plus, and its command-line user interface, Windows GUI, and iSQL*Plus web-based user interface are installed by default when you install the Oracle Database.

Some aspects of Oracle Database and SQL*Plus differ from one computer and operating organisation to another. These topics are discussed in the Oracle Database Installation Guide for each operating system that SQL*Plus supports.

What is necessary before you tin can run SQL*Plus or iSQL*Plus?

  • Install Oracle Database (or Oracle Client for the control-line SQL*Plus or Windows GUI interfaces only). Meet the Oracle Database Installation Guide for your operating system available at http://www.oracle.com/technology/documentation/.

  • Obtain an Oracle Database login username and password during installation or from your Database Ambassador. Encounter Login Username and Password.

  • Ensure a sample database is installed and that you take a login username and password for it during Oracle Database installation. Encounter Sample Schemas and SQL*Plus.

  • Create a default database during installation or obtain the connection identifier for the Oracle Database you want to connect to from your Database Ambassador. See Connecting to a Database.

  • Ensure the database yous desire to connect to is started. Come across the STARTUP control.

  • If using iSQL*Plus, ensure that you lot have the URL for the Awarding Server you want to connect to, and that the Application Server is available and running. See Starting the iSQL*Plus Application Server, and Testing if the iSQL*Plus Application Server is Running.

SQL*Plus Appointment Format

The default engagement format in SQL*Plus is determined by the database NLS_DATE_FORMAT parameter and may utilize a appointment format displaying ii digit years. You tin can use the SQL TO_CHAR function, or the SQL*Plus Cavalcade FORMAT control in your SELECT statements to control the way dates are displayed in your study.

Starting SQL*Plus Control-line

The SQL*Plus executable is unremarkably installed in $ORACLE_HOME/bin, which is usually included in your operating system PATH environment variable. You may need to change directory to the $ORACLE_HOME/bin directory to showtime SQL*Plus.

In the following examples, you are prompted to enter the database business relationship password.

An example using an Piece of cake Connection identifier to connect to the Hr schema in the MYDB database running on mymachine is:

sqlplus hr@//mymachine.mydomain:port/MYDB        

An example using a Net Service Name is:

sqlplus hr@MYDB        

Cyberspace Service Names tin can be stored in a number of places, including Oracle Names. See the Net Services Reference Guide for more than data.

If y'all want to employ Net Service Names configured in a local Oracle Net tnsnames.ora file, then prepare the surround variable TNS_ADMIN to the directory containing the tnsnames.ora file. For example, on UNIX, if your tnsnames.ora file is in /home/user1 and it defines the Net Service Name MYDB2:

TNS_ADMIN=/home/user1 export TNS_ADMIN sqlplus hr@MYDB2        

This case assumes the ORACLE_HOME environment variable is gear up, and the $ORACLE_HOME/network/admin/tnsnames.ora or %ORACLE_HOME%\network\admin\tnsnames.ora file defines the Net Service Proper name MYDB3:

sqlplus hr@MYDB3        

The TWO_TASK (on UNIX) or LOCAL (on Windows) surround variable can exist prepare to a connection identifier. This removes the need to explicitly enter the connection identifier whenever a connection is made in SQL*Plus or SQL*Plus Instant Client. This UNIX example connects to the database known as MYDB4:

TNS_ADMIN=/habitation/user1 consign TNS_ADMIN TWO_TASK=MYDB4 export TWO_TASK sqlplus hour        

To offset SQL*Plus and connect to the default database

  1. Open up a UNIX or a Windows terminal and enter the SQL*Plus command:

    sqlplus            
  2. When prompted, enter your Oracle Database username and countersign. If you lot exercise not know your Oracle Database username and password, enquire your Database Administrator.

  3. Alternatively, enter the SQL*Plus command in the form:

    sqlplus              username            

    You are prompted to enter your password.

  4. SQL*Plus starts and connects to the default database.

    Now you can get-go entering and executing SQL, PL/SQL and SQL*Plus statements and commands at the SQL> prompt.

To start SQL*Plus and connect to a database other than the default

Open a UNIX or a Windows terminal and enter the SQL*Plus control:

sqlplus          username@connect_identifier        

You are prompted to enter your countersign.

Starting SQL*Plus Windows GUI

To offset the SQL*Plus Windows GUI and connect to a database

  1. Click Get-go > Programs > Oracle- OraHomeName > Application Evolution > SQL Plus.

  2. Alternatively, open up a Windows terminal and enter the SQL*Plus command:

    sqlplusw            
  3. The SQL*Plus Windows GUI opens and the Log On dialog is displayed.

    Enter your Oracle Database username and password in the Log On dialog. If you do non know your Oracle Database username and password, ask your Database Administrator.

    Go out the Host String field blank to connect to the default database. Enter a connection identifier for the database you desire to connect to in the Host Cord field. You can connect to Oracle8i, Oracle9i and Oracle Database 10g databases.

  4. Click OK. SQL*Plus starts and connects to the database.

    Now you can commencement inbound and executing SQL, PL/SQL and SQL*Plus statements and commands at the SQL> prompt.

Starting iSQL*Plus

To offset an iSQL*Plus session

  1. Enter the iSQL*Plus URL in your web browser'due south Location or Address field. The iSQL*Plus URL looks similar:

    http://machine_name.domain:port/isqlplus            

    If you lot do not know the iSQL*Plus URL, inquire your System Ambassador, or try one of the following on the machine running the iSQL*Plus Application Server.

    http://127.0.0.1:5560/isqlplus/ http://localhost:5560/isqlplus/            

    iSQL*Plus uses HTTP port 5560 by default. If iSQL*Plus is not available on port 5560, read the $ORACLE_HOME/install/portlist.ini file on the calculator running the iSQL*Plus Awarding Server to notice the port on which iSQL*Plus is running.

  2. Printing Enter to become to the URL. The iSQL*Plus Login screen is displayed in your web browser.

  3. Enter your Oracle Database username and password in the Username and Password fields. If you do not know your Oracle Database username and countersign, inquire your Database Administrator.

  4. Go out the Connexion Identifier field blank to connect to the default database.

    Enter an Oracle Database connection identifier in the Connection Identifier field to connect to a database other than the default. You can connect to Oracle8i, Oracle9i and Oracle Database 10grand databases.

    If restricted database access has been configured, the Connection Identifier field is a dropdown listing of available databases to select.

  5. Click Login to connect to the database. The iSQL*Plus Workspace is displayed in your web browser.

    Now you can beginning entering and executing SQL, PL/SQL and SQL*Plus statements and commands in the Workspace.

Starting and Stopping the iSQL*Plus Application Server

The iSQL*Plus Application Server is started during Oracle Database installation. It must exist running to enable web-based iSQL*Plus sessions. See Starting the iSQL*Plus Application Server.

Starting SQL*Plus Instant Client

SQL*Plus Instant Client is the SQL*Plus command-line without the need to install Oracle Database. For information most using it, see Starting SQL*Plus Command-line.

Because SQL*Plus Instant Client does non include a database, it is always 'remote' from any database server. To connect to a database you must specify the database using an Oracle Internet connection identifier.

If TNS_ADMIN is not gear up, and so an operating organization dependent set of directories is examined to observe tnsnames.ora. This search path includes looking in the directory specified by the ORACLE_HOME environs variable for network/admin/tnsnames.ora. This is the only reason to set the ORACLE_HOME surround variable for SQL*Plus Instant Client. If ORACLE_HOME is set up when running Instant Customer applications, information technology must exist prepare to a directory that exists.

Connecting to a Different Database

To connect to a different database from a current control-line session

From an existing Windows GUI or command-line session, enter a CONNECT control in the form:

SQL> connect          username@connect_identifier        

You lot are prompted to enter your countersign.

To connect to a unlike database from a current iSQL*Plus session

From an existing iSQL*Plus session, enter a CONNECT command in the form:

connect          username@connect_identifier        

You are prompted to enter your countersign.

Sample Schemas and SQL*Plus

Sample schemas are included with the Oracle Database. Examples in this guide use the EMP_DETAILS_VIEW view of the Human Resources (HR) sample schema. This schema contains personnel records for a fictitious company. To view column details for the view, EMP_DETAILS_VIEW, enter

DESCRIBE EMP_DETAILS_VIEW        

For more data about the sample schemas, come across the Oracle Database Sample Schemas guide.

Unlocking the Sample Tables

The Human Resources (HR) Sample Schema is installed as part of the default Oracle Database installation. The Hr account is locked by default.

Yous demand to unlock the 60 minutes account before you lot can use the 60 minutes sample schema. To unlock the HR business relationship, log in as the SYSTEM user and enter the following command, where your_password is the password you want to define for the user HR:

ALTER USER HR IDENTIFIED BY          your_password          Business relationship UNLOCK;        

For further information about unlocking the HR account, run into the Oracle Database Sample Schemas guide. The HR user is primarily to enable you to access the HR sample schema and is necessary to enable y'all to run the examples in this guide.

Each tabular array in the database is "owned" past a particular user. You may wish to have your own copies of the sample tables to use as you try the examples in this guide. To go your own copies of the 60 minutes tables, see your DBA or encounter the Oracle Database Sample Schemas guide, or you tin can create the Hour tables with the script HR_MAIN.SQL which is located in the following directory on UNIX:

$ORACLE_HOME/demo/schema/human_resources/hr_main.sql        

And on the following directory on Windows:

%ORACLE_HOME%\DEMO\SCHEMA\HUMAN_RESOURCES\HR_MAIN.SQL        

To create the HR tables from command-line SQL*Plus, do the following:

  1. Enquire your DBA for your Oracle Database account username and password.

  2. Login to SQL*Plus.

  3. On UNIX, enter the post-obit control at the SQL*Plus prompt:

    SQL> @?/DEMO/SCHEMA/HUMAN_RESOURCES/HR_MAIN.SQL            

    On Windows, enter the following command at the SQL*Plus prompt:

    SQL> @?\DEMO\SCHEMA\HUMAN_RESOURCES\HR_MAIN.SQL            

To remove the sample tables, perform the same steps merely substitute HR_DROP.SQL for HR_MAIN.SQL.

Running your showtime Query

To describe a database object using iSQL*Plus, for example, column details for EMP_DETAILS_VIEW, enter a DESCRIBE command similar:

DESCRIBE EMP_DETAILS_VIEW        

which produces the post-obit output:

Description of describe.gif follows
Description of the illustration draw.gif

To rename the column headings, and to select data from the HR sample schema view, EMP_DETAILS_VIEW, enter

COLUMN FIRST_NAME HEADING "Outset Proper noun" COLUMN LAST_NAME HEADING "Family Name" SELECT FIRST_NAME, LAST_NAME FROM EMP_DETAILS_VIEW WHERE LAST_NAME Similar 'K%';        

which produces the following output:

Description of selectout.gif follows
Clarification of the analogy selectout.gif

Exiting SQL*Plus

Information technology is recommended that yous e'er use the Logout icon to exit iSQL*Plus to costless upwards system and server resource.

To exit SQL*Plus command-line, enter Get out.

To exit the Windows GUI, enter EXIT or select Get out from the File menu.

In iSQL*Plus, the Get out or QUIT command halts the script currently running, it does not finish your session.

Source: https://docs.oracle.com/cd/B19306_01/server.102/b14357/qstart.htm

Posted by: williamsdirly1955.blogspot.com

0 Response to "How To Install Sqlplus On Windows 10"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel