Parameter or Variable | Description |
---|---|
Environment variable to specify the path used to search for libraries on UNIX and Linux. The environment variable may have a different name on some operating systems, such as DYLD_LIBRARY_PATH on Apple Mac OS, LIBPATH on IBM/AIX-5L, and SHLIB_PATH on HP-UX. Not applicable to Windows operating systems. Example $ORACLE_HOME/lib
|
|
Windows environment variable to specify a connection string. Performs the same function as TWO_TASK on UNIX.Windows平台下的环境变量。类似于Unix中的TWO_TASK |
|
Environment variable to specify globalization behavior. Example american_america.utf8
|
|
Environment variable to specify where SQL*Plus is installed. It is also used by SQL*Plus to specify where message files are located. Examples: d:\oracle\10g
/u01/app/oracle/product/v10g
|
|
指定版本
|
Environment variable to specify the database edition to use. If you specify the edition with the CONNECT or SQLPLUS command option, edition=value, it is used instead of ORA_EDITION. If no edition is specified in either the CONNECT or SQLPLUS command option, or in ORA_EDITION, SQL*Plus connects to the default edition. |
Environment variable to specify the locations of the NLS data and the user boot file in SQL*Plus 10.2. The default location is $ORACLE_HOME/nls/data. In a system with both Oracle9i and 10g, or a system under version upgrade, you should set ORA_NLS10 for Oracle 10g and set ORA_NLS33 for 9i. The default NLS location in 9i was $ORACLE_HOME/common/nls/admin/data. |
|
在sqlplus执行@sql时也从这个目录中找
和下面的SQLPATH类似,SQLPATH多一个登陆加载的功能
|
Environment variable to specify the location of SQL scripts. If SQL*Plus cannot find the file in ORACLE_PATH, or if ORACLE_PATH is not set, it searches for the file in the current working directory. Not
applicable to Windows
指定执行sql脚本的目录,如果不指定默认为当前工作目录
|
Environment variable to specify the database instance, optional |
|
Environment variable to specify the path to search for executables, and DLLs in Windows. Typically includes ORACLE_HOME/bin |
|
设置在sqlplus启动是加载login.sql文件的位置,如表格后面
在sqlplus执行@sql时也从这个目录中找
|
Environment variable or Windows registry entry to specify the location of SQL scripts. SQL*Plus searches for SQL scripts, including login.sql, in the current directory and then in the directories specified by SQLPATH, and in the subdirectories of SQLPATH directories. SQLPATH is a colon separated list of directories. There is no default value set in UNIX installations. In Windows, SQLPATH is defined in a registry entry during installation. For more information about the SQLPATH registry entry, see SQLPATH Registry Entry. |
指定tnsnames.ora的路径,如果不指定默认使用$ORACLE_HOME/network/admin
|
Environment variable to specify the location of the tnsnames.ora file. If not specified, $ORACLE_HOME/network/admin is used Example h:\network
/var/opt/oracle
|
UNIX
environment variable to specify a connection string. Connections that do
not specify a database will connect to the database specified in
TWO_TASK.
指定默认连接的数据库,后面没有加相应的字符串的话,就去连接TWO_TASK指定的字符串
Example TWO_TASK=MYDB
export TWO_TASK
sqlplus hr
is the same as: sqlplus hr@MYDB
取消环境变量
export TWO_TASK=‘‘
|
set newpage 0
set feedback on
set define on
set serveroutput on
set termout on
set time off
set timing on
set verify on
set linesize 80
set pagesize 30
set sqlprompt "_USER‘@‘_CONNECT_IDENTIFIER _DATE>"
alter session set nls_date_format=‘YYYY-MM-DD HH24:MI:SS‘;
STORE SET file_name
START file_name
或者@file_name
Running the hlpbld.sql Script to Install Command-line Help
Run the provided SQL script, HLPBLD.SQL, to load command-line help.
-
Log in to SQL*Plus as the SYSTEM user with:
SQLPLUS SYSTEM
You are prompted to enter the password you have defined for the SYSTEM user.
-
In UNIX run the SQL script, HLPBLD.SQL, from SQL*Plus with:
@$ORACLE_HOME/sqlplus/admin/help/helpus.sql unix小写
In Windows run the SQL script, HLPBLD.SQL, from SQL*Plus with:
@ORACLE_HOME\SQLPLUS\ADMIN\HELP\HLPBLD.SQL HELPUS.SQL
The HLPBLD.SQL script creates and loads the help tables.
Running the helpdrop.sql Script to Remove Command-line Help
Run the provided SQL script, HELPDROP.SQL, to remove the command-line help.
-
Log in to SQL*Plus as the SYSTEM user with:
SQLPLUS SYSTEM
You are prompted to enter the password you have defined for the SYSTEM user.
-
In UNIX run the SQL script, HELPDROP.SQL, from SQL*Plus with:
@$ORACLE_HOME/sqlplus/admin/help/helpdrop.sql
In Windows run the SQL script, HELPDROP.SQL, from SQL*Plus with:
@ORACLE_HOME\SQLPLUS\ADMIN\HELP\HELPDROP.SQL
The HELPDROP.SQL script drops the help tables, and then disconnects.