Chapter 3. Configuring the Database for Use with Log Central


Log Central has several utilities that configure the database. Use these utilities to perform the following tasks:

Managing Your Database

You can manage your database by creating and deleting database schemas.

Creating a Database Schema

Use the lc_create_schema application to create the database table definitions used by Log Central to store message data. These tables are shown in detail in Appendix E, "Database Schema." The initialization file msg_processor.ini contains information about connecting to the database. This file is described in detail in Appendix F, "Initialization File."

To run this application, simply type lc_create_schema on the Central Host.

The syntax of the command follows:

lc_create_schema [-inifile inifilename]

where:

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

If an error occurs, or the script called by the application aborts, run the lc_drop_schema application to clean up files that may have been created, correct the problem, and recreate the schema.

Dropping a Database Schema

Use the lc_drop_schema application to drop the Log Central database schema. You might want to do this because the script called by the lc_create_schema application aborted. If so, ignore all error messages generated by lc_drop_schema, since it may try to drop tables and synonyms that were not yet created. You might also run the lc_drop_schema application before reinstalling Log Central.

The syntax of the command follows:

lc_drop_schema [-inifile inifilename]

where:

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

Categorizing Messages by Resource

You might wish to partition the Log Central database, separating various messages (such as NT events, Oracle messages, BEA TUXEDO messages, and so on) into different categories. These categories represent a resource that generates messages; these resources are known as subsystems. Every message has two unique attributes, message ID and subsystem. You can create, add, or drop subsystem entries, and delete subsystems within Log Central, using the subsystem_create and subsystem_delete commands.

Creating Subsystem Entries in the Database

Use the subsystem_create application to create subsystem entries in the Log Central database. The syntax of the command follows:

subsystem_create -s subsystem_name [subsystem_name]
-d subsystem_description [-inifile inifilename]

where:

subsystem_name
Specifies the subsystem name. This is one or more strings, each of up to eight characters. Each string must be entirely in upper case, and it must be unique in the Log Central database. You can supply a list of subsystem names.

subsystem_description
Gives a short description of the subsystem. This is a string of up to 40 characters. If it contains more than one word, enclose the entire string in double quotes.

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

An example follows:

subsystem_create -s ORACLE -d "Oracle Database Alert Log"

Note: If you wish only to modify the subsystem description, use the message definition editor. Modifying the subsystem description is described in Chapter 9, "Using the Log Central Console."

Deleting a Subsystem Entry

Use the subsystem_delete application to delete a subsystem entry from the Log Central database from the command line. All the message definitions for the specified subsystem are also deleted; however, the Log Central messages for the specified subsystem not deleted. The syntax of the command follows:

subsystem_delete -s subsystem_name [subsystem_name]
[-inifile inifilename]

where:

subsystem_name
Specifies the subsystem name. You can supply a list of subsystem names.

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

An example follows:

subsystem_delete -s ORACLE

Managing Log Central User Entries

Log Central provides a number of commands for creating and deleting users, modifying user password, and listing available users found in the Log Central database.

Add a User

Use the lc_user_create application to create a new user in the Log Central database. The syntax of the command follows:

lc_user_create -u username -p password [-inifile inifilename]

where:

username
Specifies the name of the user to create, which can be up to 10 characters, and contain any alphanumeric character, as well as a hyphen or underscore.

password
Specifies the user password, which can be up to 10 characters, and contain any printable ASCII character.

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

An example follows:

lc_user_create -u simpson -p simps0n

Delete a User

Use the lc_user_delete application to delete a user from the Log Central database. The syntax of the command follows:

lc_user_delete -u username -p password [-inifile inifilename]

where:

username
Specifies the name of the user to delete.

password
Specifies the password.

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

An example follows:

lc_user_delete -u simpson -p simps0n

Modify a Password

Use the lc_user_modify application to modify a user password in the Log Central database. The syntax of the command follows:

lc_user_modify -u username -p oldpassword -n newpassword
[-inifile inifilename]

where:

username
Specifies the name of the user to modify.

oldpassword
Specifies the current password.

newpassword
Specifies the new user password, which can be up to 10 characters, and contain any printable ASCII character.

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."

An example follows:

lc_user_modify -u simpson -p simps0n -n s1mps0n

List Users

You can use the lc_user_list application to list all the users in the Log Central database. The syntax of the command follows:

lc_user_list [-inifile inifilename]

where:

inifilename
Specifies the complete file name of the initialization file. If no name is given, the name msg_processor.ini is used. The initialization file is described in detail in Appendix F, "Initialization File."