npac_db_setup

NPAC Database Maintenance

Creates or removes the regional NPAC database.

Keyword

npac_db_setup

Permission

The user must be logged in with the user name lsmsadm.

Restrictions

Syntax

$LSMS_DIR/npac_db_setup <Action> <Region>

This command must be run from the $LSMS_DIR directory and run only from the primary server.

Options

None.

Parameters

Action
Specifies the action to be performed on the database. This is a mandatory parameter with the following values:
  • create
  • remove
Region
NPAC region associated with this npacagent. This is a mandatory parameter with the following values:
  • Canada
  • Midwest
  • MidAtlantic
  • Southeast
  • Southwest
  • Northeast
  • Western
  • WestCoast

Sample Output

# Create NPAC database for Canada region for the first time

> $LSMS_DIR/npac_db_setup create Canada
-------------------------------------------------------------------------
Npac Region Database Setup Script
The Region Database Name is CanadaDB
Initializing regional database...CanadaDB
The regional database CanadaDB was created successfully.
>
> $LSMS_DIR/npac_db_setup remove Northeast
# Remove NPAC database for Northeast Region
-------------------------------------------------------------------------
Npac Region Database Setup Script
The Region Database Name is NortheastDB
Warning: NPAC region database CanadaDB is about to be removed.
 
  All data in the database will be lost.
 
  Do you want to continue? [Y/N]Y
Removing regional database...CanadaDB
>

Response Notes

This command takes approximately 35 to 40 seconds to execute.

Possible Errors

Error Messages: npac_db_setup

Exit Code

Cause

Suggested Recovery

1

Syntax was incorrect

Use correct syntax.

2

MySQL command failed

Contact Oracle.

7

User attempted to create a database that already exists

None needed.

9

User attempted to remove a database that is in use

Stop indicated processes before attempting to remove the database.

10

The root user cannot execute this command

Change users to lsmsadm.

12

User attempted to remove database for an active region

Make region inactive and retry command.