Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» Sitemap
Free Newsletters:
DatabaseDaily  
News Via RSS Feed


follow us on Twitter
Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

Oracle

Posted Jun 4, 2003

Altering Oracle's SQL*Plus Help Facility - Page 2

By James Koopmann

Installing Help

Typically, the HELP facility is installed along with the database during normal installation. However, if for some reason you are unable to invoke the HELP facility, it has more than likely not been installed or has been dropped from the installation. In order to install it, follow these simple steps. If these do not quite work, look inside the files within your particular HELP directory with any editor as they will be self-documenting and have changed from version to version.

1.      Change to the directory where the help install scripts reside:

cd $ORACLE_HOME/sqlplus/admin/help

2.      Log into your database with the SYSTEM account:

sqlplus system/<password>

3.      Drop any lingering help objects:

@helpdrop

4.      Create the help tables and load help information:

@helpbld helpus.sql

Beefing Up HELP

I cannot quite remember the version of Oracle, but it used to be that the HELP facility also contained quite a few topics that dealt with the DDL, DML, and other administration commands. Please e-mail me if you remember the version that this was de-supported. Anyway, I really miss some of this simple text based help and have since decided to start porting some of the more widely used command syntax back into my HELP facility on the databases that I use. There is really nothing you can't put into this HELP facility and you should seriously start thinking of giving your customers or developers as others call them, the ability to quickly access information that they need without having to page through manuals.

Adding HELP content is really just a four-step process.

1.      Load your new content through a SQL script.

2.      Rebuild the 'TOPICS' information

3.      Rebuild the 'INDEX' information

4.      Validate your information

Follow along with the simple formula.


Load Help

The content I wish to add is for the CREATE TABLESPACE command. All that is required is the TOPIC ('CREATE TABLESPACE'), a unique line number and the text for that line. After you build your topic I would suggest that you save it into its own file, in my case I called it create_tablespace.sql and then if you ever need to rebuild or port this it is very simple.

Remember you must be connected as the SYSTEM user.

Rebuild TOPICS

In order for the 'HELP TOPICS' command to work and show the new content you just added, you must rebuild the whole TOPIC content. Here are the four simple steps:

1.      Rebuild the HELP_TEMP_VIEW

CREATE OR REPLACE VIEW HELP_TEMP_VIEW (TOPIC) AS
   		SELECT DISTINCT UPPER(TOPIC) FROM HELP;

2.      Delete the TOPICS content

DELETE FROM HELP WHERE TOPIC = 'TOPICS';

3.      Rebuild the TOPICS content

INSERT INTO HELP
  SELECT 'TOPICS', ROWNUM + 10, TOPIC FROM HELP_TEMP_VIEW;

4.      Commit your work

COMMIT;


Oracle Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM


















Thanks for your registration, follow us on our social networks to keep up-to-date