At work, there are often no third-party SQL tools such as sqplus developer, which must be directly queried on the server using sqlplus.
For example, to view the SGA value of the system parameter;
The execution result is as follows:
[Gysy01 @ Oracle]/Oracle> sqlplus "/Sysdba"
SQL * Plus: Release 11.1.0.7.0-production on ThursdayFebruary 17 17:35:16 2011
C
Label:1 , format the SQL Plus interface: L Overall Settings: SET Number -- set Number of rows
SET Number -- set Number of columns L single-Column settings: ColumnName for Numeber -- character class Char,varchar2, example: A10
ColumnName for 9... 9 -- number 9 For several, example: three-bit 999 2 , notepad editing L Create a SQL file for code editing: ED filename L Execute File: @ filename Execut
an example:
sql> COLUMN SAL ALIAS Salary FORMAT $99,990.90
We've specified Sal. An alias and a digital display format for this column, and the following display shows the effect of the setting.
Figure 1
Tips on Format:
¨ a variety of text settings, with A[n] to represent, n represents the length of the display. Then the display length of this text column is in the width of N characters, if the content is >n, it will automatically change career
Tags: style blog color io for ar cti DivSQLPlus directive "whenever SQLERROR EXIT 1" would return a specified code when any SQL error throwed when run a SQL file.Then we can catch the return code from the main bat file (where we call the Sqlplus) to test it and then jump to a corres Pondence code.Below is a example, Gpdemo.sql is a normal SQL file, it'll be execute by S
2014-06-20 BaoxinjianI. Summary
If you develop a UNIX shell in Oracle EBS, it is bound to involve calling Plsql in the shell and calling Plsql in the shell typically by sqlplus this toolAbout Sqlplus need to understand Sqlplus's login and common commands, specific in the introduction of Sqlplus usage1. How to login SqlplusSqlplus [[
-C
-L atte
Basic Oracle Tutorial: SQLPLUS Environment command. Commonly Used commands of sqlplus when an SQL statement is entered, SQL is cached in SQLPLUS. This cache is small and only one SQL statement can be allowed.
Basic Oracle Tutorial: SQLPLUS Environment command. Commonly Used commands of
Variables in UNIX (C Shell) 1 SET ORACLE_SID = orawin2Example 1-2 Setting Environment Variables in Windows
Example 1-2 assume that ORACLE_HOME and ORACLE_SID are set in the registry, but you want to overwrite the registry value of ORACLE_SID to connect to other instances. On Windows, the environment variable value you set in the Command Prompt window overwrites the value in the registry.
Step 3: Start SQL * Plus
1
Label:Column [Column Name|aliases|format] (columncan be reduced to writeCol) 1. When no arguments are followed , the current defined attribute is displayed 2. You can change the English column name to Chinese display by "column name alias " 3. Format A.format ( format the specified column ( You can refer to the set instruction of the Sqlplus command )) Col column name format you want such as Col salary format $999,999,999.99 displays the Payroll c
Label:1, directly with Sql*plus directly connectedDatabaseWhen using Sql*plus to connect to the database, a dialog box is required to fill in the user name, password, and host string information. The former two needless to say, I will fill in the right, but this host string seems to have not seen Ah, actually here this string is my door in the installationOracleis automatically generated, it is the configured database connection service name, consistent with the database system identifier, but t
instruction:SELECT emp_id, Emp_nameFrom EmployeesThe input command can then add a statement after the previous instruction, such as when the above statement is run:Input WHERE emp_age > 30The following command can be obtained:SELECT emp_id, Emp_nameFrom EmployeesWHERE emp_age > 30The ln command is used to specify the operation of the nth-line statement that is entered, such as after the statement is run:L1 the currently selected statement line is theSELECT emp_id, Emp_name("*" is indicated befo
Show Errorshow Allshow UsersqlplusThe show and set commands are two commands for maintaining Sqlplus system variables:Sql> Show All--view all system variable valuesSql>show user--show current connected usersSql>show Error--Display errors (when compiling function,procedure,package,pl/sql, you can view specific error hints)Sql>set sqlprompt SQL--Set default prompt, default value is SQLSql>set linesize 1000--Set screen display line width, default 100Sql>
Tags: style http color using file data re C Sqlplus has several landing methods such as: 1. C: > Sqlplus "/as sysdba" --Oracle SYS administrator logged in 2 with operating system Authority authentication. C: > Sqlplus/nolog --not in CMD or terminal the way to expose the password sql> conn/as sysdbasql> conn Sys/password as Sysdba3. C: >
Basic SqlPlus command instructions: www.2cto.com remark annotation set headsep title line feed ttitle setting output page header title btitle setting output page tail title column formatting SQL statement columns break on notification sqlplus insert a space in the output result. compute sum notifies sqlplus to calculate the subtotal set linesize (line) set pagesi
Sqlplus component accidentally damaged recovery testSqlplus component accidentally damaged and restoredAfter executing the sqlplus/as sysdba command, there is no response, which is a bit strange...[Oracle @ lixora bin] # sqlplus/as sysdba[Oracle @ lixora bin] # ls-trl...-Rwxr-x -- x 1 oracle oinstall 0 Dec 9 sqlplus --
SQL> edit
Wrote file afiedt. buf
40
As shown in the preceding figure,
After setting vi as the default editor, there is no problem:SQL> set _ EDITOR = viSQL> ed
However, in this case, I only set session settings, which will expire after re-login. If you want to save the configuration, you can save the editor settings to the configuration file and use the configuration automatically each time.Modify the $ ORACLE_HOME/sqlplus/admin/glogin. SQL c
When a DBA logs on to a local or remote database, it is no longer common to log on to the database using the sqlplus username and password @ Connection Service name, if we replace Oracle SQLPlus with our own implementation, and record its login information when using it, we will get the database username, password, and other information. This is a simple
When a DBA logs on to a local or remote database, it
Arraysize defines the number of rows returned to the SQLPLUS client at a time. After scanning the arraysize row, stop scanning, return data, and continue scanning.
This process is the SQL * Net roundtrips to/from client in the statistics.
Because arraysize is 15 rows by default, there is a problem, because the number of records in a block is generally more than 15 rows, So if you scan by 15 rows, therefore, each scan requires one more data block, and
In the Linux system once inside bash into the sqlplus or Rman after the next key will appear garbled, not like the window command line to press the left and right keys can be arbitrarily adjusted code, press the up and down keys can directly select the command has been executed. A good solution is to install the Rlwrap package to implement the functionality that was not originally available. Here is the installation process.1. First download the Rlwra
Oracle database has many query tools, such as the famous plsql, accustomed to the graphical interface, and then face the character interface Sqlplus really a torture, but I do not know that the immortal said "existence is reasonable."
Sometimes it is necessary to work in a character interface environment, such as customer site, Unix, Linux, AIX operating system, etc., this article discusses some simple editing commands in
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.