oracle: 安装sqlplus help帮助命令

来源:互联网 发布:八皇后问题 算法分析 编辑:程序博客网 时间:2024/05/06 05:11


采用system用户登录执行脚本方式

1、用system用户登录,必须的,help表属于system的schema, 而且不要以sysdba身份登录

2、执行脚本内容如下

[oracle@centos oracle]$ sqlplus system/lzx123SQL*Plus: Release 11.2.0.1.0 Production on Tue Sep 20 12:04:44 2011Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> @?/sqlplus/admin/help/helpbld.sqlEnter value for 1: /oracle/11g/sqlplus/admin/helpEnter value for 2: /oracle/11g/sqlplus/admin/help/helpus.sql

value1是helpus.sql的脚本路径,value2是脚本

3、以上即可完成创建,若遇到system表空间问题:

若出现如下问题

SQL> @/oracle/11g/sqlplus/admin/help/helpbld.sqlEnter value for 1: /oracle/11g/sqlplus/admin/helpEnter value for 2: /oracle/11g/sqlplus/admin/help/helpus.sqlPL/SQL procedure successfully completed.CREATE TABLE HELP*ERROR at line 1:ORA-00604: error occurred at recursive SQL level 1 ORA-01654: unable to extend index SYS.I_COL2 by 128 in tablespace SYSTEM 

说明system表空间不是自动扩展的,需要修改一下,过程如下:

SQL> select tablespace_name,file_name,autoextensible from dba_data_files; TABLESPACE_NAME                FILE_NAME                                AUTOEXTENSIBLE------------------------------ ---------------------------------------  --------------SYSTEM                         /oracle/mercury/system01.dbf             NOSYSAUX                         /oracle/mercury/sysaux01.dbf             NOUNDOTBS1                       /oracle/mercury/undotbs01.dbf            YESUSERS                          /oracle/mercury/users01.dbf              YES SQL> alter database datafile 1 autoextend on; Database altered SQL> 

然后再重复2就可以了