对于经常在SQL*Plus 下工作的大师们而言,总是时不时查询SQL*Plus的帮助命令。着实太多了,记不
对于经常在sql*plus 下工作的大师们而言,总是时不时查询sql*plus的帮助命令。着实太多了,记不住。sql*plus下直接提供了help命令来帮助描述所有命令的用法。嘎嘎,再也不用查sql*plus reference了。对于oracle 10g缺省情况下,sql*plus的help手册并没有被安装,,需要手动安装。oracle 10/11g下采用相同的安装方式,下面来描述一下help的安装与使用。
1、安装sqlplus help
system@CNMMBO> help
SP2-0171: HELP system not available.
robin@SZDB:~> cd $ORACLE_HOME/sqlplus/admin/help --脚本路径位于ORACLE_HOME,sqlplus/admin/hlep目录下
robin@SZDB:/users/oracle/OraHome10g/sqlplus/admin/help> ls
helpbld.sql helpdrop.sql helpus.sql hlpbld.sql
robin@SZDB:/users/oracle/OraHome10g/sqlplus/admin/help> head -40 hlpbld.sql
--
-- Copyright (c) Oracle Corporation 1983, 2003. All Rights Reserved.
--
-- NAME
-- hlpbld.sql
--
-- DESCRIPTION
-- Builds the SQL*Plus HELP table and loads the HELP data from a
-- data file. The data file must exist before this script is run.
--
-- USAGE
-- To run this script, connect as SYSTEM and pass the datafile to be
-- loaded as a parameter e.g.
--
-- sqlplus system/
--
--
DEFINE DATAFILE = &1
--
-- Create the HELP table
--
DROP TABLE HELP;
CREATE TABLE HELP
(
TOPIC VARCHAR2 (50) NOT NULL,
SEQ NUMBER NOT NULL,
INFO VARCHAR2 (80)
) PCTFREE 0 STORAGE (INITIAL 48K PCTINCREASE 0);
GRANT SELECT ON HELP TO PUBLIC;
--
-- Insert the data into HELP.
--
@@&DATAFILE
system@CNMMBO> @$ORACLE_HOME/sqlplus/admin/help/hlpbld.sql helpus.sql
DROP TABLE HELP
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
Grant succeeded.
...
Commit complete.
View dropped.

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号