Cisco SIP Proxy Server Version 2.1 Administrator Guide
4. Managing Databases

Table Of Contents

Managing Databases

Prerequisites

Information About the Database Administration Tools

How to Use the Regroute Databases Tool

Activating the Regroute Tool

Managing Databases

Importing and Exporting Configuration Files and Databases

How to Use the MySQL Database Tool

Activating the MySQL Database Tool

Displaying Information About Subscribers

Adding a Subscriber

Changing Information About a Subscriber

Removing a Subscriber

Sample Error Messages


Managing Databases


This chapter describes two Cisco SIP proxy server (Cisco SPS) database administration tools:

The registry and routing (regroute) databases tool

The MySQL database tool

It contains the following sections:

Prerequisites

Information About the Database Administration Tools

How to Use the Regroute Databases Tool

How to Use the MySQL Database Tool

Sample Error Messages


Note If you use the GUI-based provisioning system, do not use the registry and routing databases (regroute) tool to add, modify, or delete data. You can use the tool to view data such as dynamic registrations that the GUI cannot provide or to import files containing static registration or routing entries.


Prerequisites

Make a note of the regroute tool location. When a step instructs you to access the regroute tool, this is the directory to which you go in order to do so. The default location is as follows:

Linux:		/usr/local/sip/bin/sysadmin_sps_regroute

Solaris:		/opt/sip/bin/sysadmin_sps_regroute

Information About the Database Administration Tools

You can use two database-administration tools to manipulate—that is, add, delete, or modify—data:

The registry and routing (regroute) databases tool allows you to manipulate data in the registry and routing databases without interrupting proxy-server operation.

The MySQL database tool allows you to manipulate data in the MySQL server database on a local or remote system.

Each tool operates by means of a series of menus. To select a menu option, type the letter that precedes it—in either uppercase or lowercase letters—and press Enter.

Some options require additional information, such as a subscriber ID or a URL. The specific type of entry required is shown within brackets <>. For example, the option I, to import a configuration file, contains the notation "configuration <file>" to indicate that you must follow the selection I with the configuration filename.

Most options indicate a default value. You can select the default by typing either the indicated value or the wildcard character *. For example, to add data to the registry database, you must enter a value for User Type. The default value is Phone. You can type Phone or simply *.

How to Use the Regroute Databases Tool

The regroute tool allows you to manipulate—add, delete, or modify—data in the registry and routing databases without interrupting proxy-server operation. The following tasks are possible:

Activating the Regroute Tool

Managing Databases

Importing and Exporting Configuration Files and Databases


Caution Do not use multiple copies of the tool.

Activating the Regroute Tool

Command Summary

sysadmin_sps_regroute [-m {routing | registry | both}] [-l] [-i file] [-l file] [-x file] [-p file] [-h primary-host] [-j secondary-host] [-H primary-port] [-J secondary-port] [-a] [-A routing-database-address] [-B registry-database-address] [-S routing-database-name] [-R registry-database-name] [-T token-port] [-L directory] [-U routing-port] [-V registry-port] [-D]


Note The tool automatically ends after the -l, -i, -l, or -x keyword is used.


Detailed Steps


Step 1 Navigate to the directory where the regroute tool resides.

Step 2 Type sysadmin_sps_regroute.

Step 3 (Optional) Append one or more of the following keywords and press Enter:

General Keywords

-m {routing | registry | both}

Type of data: routing data, registry data, or both (you can also enter 1, 2, or 3 respectively). Use in conjunction with -l, -i, -l, and -x. Default is both (3).

-l

List all data entries specified by -m.

-i file

Import comma-separated data (of type specified by -m) from the specified configuration file.

-l file

Import Cisco SPS 2.0 data (of type specified by -m) from the specified configuration file.

-x file

Export comma-separated data (of type specified by -m) to the specified configuration file. File format is the standard stanza format of a SIP directives (sipd) configuration file for routing and registry data.

-p file

Absolute path and filename of the sipd.conf configuration file.

-h primary-host

Hostname or IP address of the primary provisioning server (pserver).

-j secondary-host

Hostname or IP address of the secondary pserver.

-H primary-port

Port to use for the primary pserver.

-J secondary-port

Port to use for the secondary pserver.

Expert Keywords (use with care)

-a

Connect to shared memory rather than the pserver.

-A routing-database-address

Routing-database shared-memory address.

-B registry-database-address

Registry-database shared-memory address.

-S routing-database-name

Routing-database name.

-R registry-database-name

Registry-database name.

-T token-port

Token port.

-L directory

Shared-memory database directory.

-U routing-port

Routing port.

-V registry-port

Registry port.

-D

Enable debugging.


Examples

sysadmin_sps_regroute -i xyz.conf

sysadmin_sps_regroute -x xyz.conf -l

sysadmin_sps_regroute -i abc.conf -x xyz.conf -m registry

sysadmin_sps_regroute -p /opt/sip/xyz.conf


Managing Databases

Detailed Steps


Step 1 Open the regroute tool Routing and Registry Databases main menu (see the "Activating the Regroute Tool" section).

Step 2 To select a database, do the following:

a. Select S (select registry or routing database).

b. Select a database:

Y (registry database)

Z (routing database)

The text line under the menu title indicates which database is selected.

Step 3 To add or delete a database, do the following:

a. Select D (query, add to, or delete from the database).

b. Select one of the following:

A (add an entry to the database)

D (delete an entry from the database)

c. Select E (enter the registry user ID) and enter required data as prompted.

Step 4 To search a database, do the following:

a. Select D (query, add to, or delete from the database).

b. Select S (search the database).

c. Select E (enter the destination pattern) and enter the required data as prompted.

Step 5 To display the contents of a database, do the following:

a. Select D (query, add to, or delete from the database).

b. Select L (list everything in the database).

Step 6 To display database-memory information, do the following:

a. Select S (select registry or routing database).

b. Select D (display the shared memory and database information). A status message appears.

Step 7 To exit, select one of the following:

M (return to the main menu)

P (return to the previous menu)

Q (exit from the tool)


Importing and Exporting Configuration Files and Databases

Importing the content of a configuration file to a database allows you to update both the registry and routing databases with the configuration file content as long as the system finds matching entries.

Exporting the content of a database to a configuration file appends the database to the specified file. Entries are exported from the database (routing or registry) as specified by the -m option.

Detailed Steps


Step 1 Open the regroute tool Routing and Registry Databases main menu (see the "Activating the Regroute Tool" section).

Step 2 Select one of the following options:

I (import a configuration with route/registry entries)

X (export current database entries to a configuration)

Step 3 Enter the configuration filename. When import or export is complete, a status message appears.

Step 4 To exit, select one of the following options:

M (return to the main menu)

P (return to the previous menu)

Q (exit from the tool)


How to Use the MySQL Database Tool

The MySQL database tool allows you to modify a MySQL server on a local or remote system. The following tasks are possible:

Activating the MySQL Database Tool

Displaying Information About Subscribers

Adding a Subscriber

Changing Information About a Subscriber

Removing a Subscriber


Note If the tool is running remotely, the remote MySQL server need not be a Linux or Solaris system. This tool has been successfully tested on Redhat 7.1 and Solaris 2.8 platforms.


Activating the MySQL Database Tool

Detailed Steps


Step 1 Log in to Cisco SPS as root.

Step 2 Run the sysadmin MySQL user script:

Linux:		# /usr/local/sip/bin/sysadmin_mysql_user

Solaris:		# /opt/sip/bin/sysadmin_mysql_user

Step 3 Enter the host name, username, and password as directed.

Step 4 Enter the database name and table name. The MySQL Database main menu appears.


Displaying Information About Subscribers

Detailed Steps


Step 1 Open the MySQL Database main menu (see the "Activating the MySQL Database Tool" section).

Step 2 To display information about a single subscriber, select S (show subscriber) and enter a subscriber ID as prompted.

Step 3 To display a list of all subscribers with or without details on each, do the following:

a. Select L (list all subscribers).

b. Select the desired level of detail:

Y (details for each subscriber ID)

N (summary list of subscriber IDs)

Step 4 To exit, select X.


Adding a Subscriber

Detailed Steps


Step 1 Open the MySQL Database main menu (see the Activating the MySQL Database Tool).

Step 2 Select A (add subscriber) and enter a subscriber ID and domain name as prompted.

Step 3 To assign a password, select P (password) and enter a password for the subscriber as prompted.

Step 4 To assign call-forwarding, select one of the following:

B (call forward busy)

N (call forward no answer)

U (call forward unconditional)

V (call forward unavailable)

Step 5 Enter the appropriate URL as prompted.

Step 6 To exit, select X.


Changing Information About a Subscriber

Detailed Steps


Step 1 Open the MySQL Database main menu (see the "Activating the MySQL Database Tool" section).

Step 2 Select M (modify subscriber) and enter a subscriber ID as prompted.

Step 3 Modify the attributes by selecting the appropriate options in the menu and enter new data as prompted. If a system user has forgotten a password, assign a new one.

Step 4 To exit, select X.


Removing a Subscriber

Detailed Steps


Step 1 Open the MySQL Database main menu (see the "Activating the MySQL Database Tool" section).

Step 2 Select R (remove subscriber) and enter a subscriber ID and domain name as prompted.

When removal is complete, a status message appears. The list of subscribers appears without the record that you just removed.

Step 3 To exit, select X.


Sample Error Messages


Note These messages, plus additional troubleshooting information, appear in "Troubleshooting."


Error Message    Error 2002: Can't connect to local MySQL server through socket....

Possible Cause    The MySQL database is not installed.

Recommended Action    Install the database before running the tool.

Error Message    Error 1045: Access denied for user.... Operation failed.

Possible Cause    Your MySQL username and password are invalid.

Possible Cause    Your MySQL username and password have insufficient permission to access the database.

Recommended Action    Enter the correct or properly enabled username and password. If a system user has forgotten a password, assign a new one.

Error Message    Error 1116: Table `sip.subscriber...' doesn't exist. Operation failed.

Possible Cause    The database whose name you entered does not exist.

Recommended Action    Enter a valid name or reinstall the database.

Error Message    ERROR: Invalid user_id syntax.

Possible Cause    Your subscriber ID has invalid syntax.

Recommended Action    Enter a valid subscriber ID.

Error Message    ERROR: Invalid dest_url_cfna syntax.

Possible Cause    Your call-forwarding destination URL has invalid syntax.

Recommended Action    Enter a valid URL.