Sqlplus联机文档学习

Sqlplus联机文档:

http://download.oracle.com/docs/cd/E11882_01/server.112/e16604/ch_two.htm#CHDHAECG

配置Sqlplus

[原文]

Configuring SQL*Plus

This chapter explains how to configure your SQL*Plus command-line environment. It has the following topics:

  • SQL*Plus Environment Variables

  • SQL*Plus Configuration

[译文]

配置Sqlplus

这部分章节解释怎么配置Sqlplus的命令行。主要两个内容:

  • Sqlplus环境变量
  • Sqlplus配置

[原文]

SQL*Plus Environment Variables

These environment variables specify the location or path of files used by SQL*Plus. For other environment variables that influence the behavior of SQL*Plus, see the Oracle Database Administrator's Reference.

Table 2-1 Parameters or Environment Variables influencing SQL*Plus

[译文]

Sqlplus的环境变量

这些环境变量通常由Sqlplus指定被使用文件的本地位置或路径,其它的环境变量对Sqlplus的操作方式有一定影响,具体参考Oracle数据库管理员指南。

表2-1参数或环境变量影响Sqlplus

Parameter or Variable

参数或变量

Description

描述

LD_LIBRARY_PATH

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 这个环境变量用来指定Sqlplus搜索函数库的路径,对使用Unix和Linux系统的用户有影响。对不同的系统有不同的名称。对Windows系统没有影响。 例如 $ORACLE_HOME/lib

LOCAL

Windows environment variable to specify a connection string. Performs the same function as TWO_TASK on UNIX.

这个环境变量是Windows系统的,用来指定连接一个字符串,像Unix系统上执行TWO_TASK命令函数一样。

NLS_LANG

Environment variable to specify globalization behavior.

Example

american_america.utf8 这个环境变量用来指定语言选择的执行情况。 例如 american_america.utf8

ORACLE_HOME

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 这个环境变量用来指定Sqlplus被安装在哪里,也用来指Sqlplus的一些信息文件存放的位置。 例如 d:\oracle\10g /u01/app/oracle/product/v10g

ORA_EDITION

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.

这个环境变量用来指定使用什么工具来编辑数据库。如果指定连接和Sqlplus命令运行的编辑器,需要设置edition=value,通过这个设置来启动Oracle的编辑器,如果不指定,则Sqlplus使用默认的编辑器。

ORA_NLS10

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.

这个环境变量设置主要做升级使用。9i设置ORA_NLS33,或者10g设置ORA_NLS10.

在9i中默认的文件存放位置在$ORACLE_HOME/common/nls/admin/data.

ORACLE_PATH

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脚本存放的位置。如果Sqlplus不能够找到指定的ORACLE_PATH,或者ORACLE_PATH没有设置,则只能在当前的工作目录中寻找脚本文件。

这个环境变量对Windows系统没有影响。

ORACLE_SID

Environment variable to specify the database instance, optional

这个环境变量用来指定数据的实例。

PATH

Environment variable to specify the path to search for executables, and DLLs in Windows. Typically includes ORACLE_HOME/bin

这个环境变量指定将要查找的Windows系统中的可执行文件和动态链接库位置,典型的位置在ORACLE_HOME/bin。

SQLPATH

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.

这个环境变量指定SQL脚本存放的位置,Sqlplus搜索SQL脚本,包括login.sql,在当前目录和指定的SQLPATH目录及其子目录中。

在Windows系统中,SQLPATH在安装过程中被定义为一个注册。

TNS_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 这个环境变量指定存储文件tnsnames.ora,如果不指定,这个目录$ORACLE_HOME/network/admin将被使用。 例如 h:\network /var/opt/oracle

TWO_TASK

UNIX environment variable to specify a connection string. Connections that do not specify a database will connect to the database specified in TWO_TASK.

Example

TWO_TASK=MYDB export TWO_TASK sqlplus hr

is the same as:

sqlplus hr@MYDB UNIX系统环境变量指定连接的字符串。 例如 TWO_TASK=MYDB export TWO_TASK sqlplus hr

is the same as:

sqlplus hr@MYDB

(待续……)

你可能感兴趣的:(数据库,学习,文档,sqlplus,联机)