"SQL * PLUS help unavailable" solution step, sqlplus

Source: Internet
Author: User

"SQL * PLUS help unavailable" solution step, sqlplus

SQL * PLUS is the most common CMD interface for oracle database management. The help system provides quick guidance and help for us to execute some commands, this feature is installed by default during oracle installation. Sometimes this function is lost due to some unexpected reasons. The following error occurs when you use the help system:

SP2-0171: The help system is unavailable.

This causes a lot of inconvenience and trouble. The following is a solution to this problem, which is also officially recommended. You can find it in the oracle help document. Here, we only use the corresponding environment practices to help you.

Oracle version:

SQL> select * from v $ version;

BANNER

-------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0-Production

PL/SQL Release 11.1.0.6.0-Production

CORE 11.1.0.6.0 Production

TNS for 32-bit Windows: Version 11.1.0.6.0-Production

NLSRTL Version 11.1.0.6.0-Production

 

Log on to the system account to query help information:

SQL> conn system

Enter the password:

Connected.

SQL> help

SP2-0171: The help system is unavailable.

 

The following are the steps to reconstruct the help system:

1. Run the $ ORACLE_HOME/sqlplus/admin/help/hlpbld. SQL script to create the table mode of help content.

SQL> @ E: \ app \ Administrator \ product \ 11.1.0 \ db_1 \ sqlplus \ admin \ help \ hlpbld. SQL

2. Execute the $ ORACLE_HOME/sqlplus/admin/help/helpus. SQL script to automatically fill in the help content

SQL> @ E: \ app \ Administrator \ product \ 11.1.0 \ db_1 \ sqlplus \ admin \ help \ helpus. SQL

3. Check help. SQL * PLUS is used to help the system.

SQL> help

HELP

----

Accesses this command line help system. Enter help index or? INDEX

For a list of topics.

You can view SQL * Plus resources

Http://www.oracle.com/technology/tech/ SQL _plus/

And the Oracle Database Library

Http://www.oracle.com/technology/documentation/

HELP |? [Topic]

 

The Help help system actually queries a Help table maintained by the system account. If we open hlpbld. if you have carefully studied the SQL script, you can see that it is ambiguous. The following table defines the help mode to extract the hepbld. SQL script:

CREATE TABLE HELP

(

TOPIC VARCHAR2 (50) not null,

Seq number not null,

INFO VARCHAR2 (80)

) PCTFREE 0 STORAGE (INITIAL 48 k pctincrease 0 );

 

The Helpus. SQL script is used to insert the content of the help table. The following is the content (part of the content) to be inserted ):

Insert into help values ('@', 1, NULL );

Insert into help values ('@', 2, '@ ("at" sign )');

Insert into help values ('@', 3 ,'-------------');

Insert into help values ('@', 4, 'RUNS the SQL * Plus statements in the specified script. The script can be ');

Insert into help values ('@', 5, 'called from the local file system or a web server .');

Insert into help values ('@', 6, NULL );

Insert into help values ('@', 7, '@ {url | file_name [. ext]} [arg...]');

Insert into help values ('@', 8, NULL );

Insert into help values ('@', 9, 'where url supports HTTP and FTP protocols in the form :');

Insert into help values ('@', 10, NULL );

Insert into help values ('@', 11, 'http://host.domain/script. SQL ');

Insert into help values ('@', 12, NULL );

Insert into help values ('@', 1, NULL );

......

You can also query the help table definitions when logging on to the system account:

SQL> conn system

Enter the password:

Connected.

SQL> desc help

Is the name empty? Type

--------------------------------------------------------------------------

Topic not null VARCHAR2 (50)

SEQ NOT NULL NUMBER

INFO VARCHAR2 (80)

 

You can also verify the definition of the help table, which is the content of the help system.

OK. The help system of SQL * PLUS solves the problem roughly. For details, refer to the oracle documents and scripts to further study the content of oracle.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.