Medium size databases and common commands for Oracle

Source: Internet
Author: User

One: Medium size database

Two: Basic command connection Command 1, Conn[ect]

USAGE: Conn username/password @ network server name [as Sysdba/sysoper] when connected as a privileged user, you must bring as SYSDBA or as Sysoper

2, Disc[onnect]

Description: This command is used to disconnect from the current database

3, Passw[ord]

Note: This command is used to modify the user's password, and if you want to modify another user's password, you need to log in with Sys/system.

4. Show user

Description: Displays the current user name

5. Exit

Description: The command disconnects from the database and exits SQL * Plus

File Operations Command 1, start and @

Description: Run SQL script

Case:

SQL>@ d:\a.sql or SQL>start d:a.sql

2. Edit

Description: The command can edit the specified SQL script

Case:

SQL>edit D:\a.sql, this will open the D:\a.sql file

3, Spool

Note: This command can output the contents of the Sql*plus screen to the specified file.

Case:

SQL>spool d:\b.sql and enter SQL>off

Interactive commands 1, &

Note: You can override a variable, which needs to be entered by the user when it executes.

Select * where job='&job';

Displaying and setting environment variables

Overview: Can be used to control the output of various formats, set show if you want to permanently save the relevant settings, you can go to modify the Glogin.sql script

1, Linesize

Description: Sets the width of the display line, which is 80 characters by default

Show Linesize Set  -

2\pagesize

Description: Sets the number of rows displayed per page, default is 14

Usage is the same as linesize.

The use of other environmental parameters is similar

Medium size databases and common commands for Oracle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.