Guest

Cisco Wireless Control System

Wireless Control System (WCS) - Usage of Dbadmin Commands

Document ID: 99118



Contents

Introduction
Prerequisites
      Requirements
      Components Used
      Conventions
Dbadmin.bat Commands on WCS
Reinitialize the WCS Database
Perform a Manual Backup
Restore the WCS Database
Perform a Remote Backup to an FTP Server
Restore the Database from an FTP Server
Change the WCS Database Password
Defragment the WCS Database
NetPro Discussion Forums - Featured Conversations
Related Information

Introduction

This document discusses some of the commands that can be used in order to manage the Wireless Control System (WCS) database. This is accomplished with the dbadmin.bat commands, which are available under the WCS installation directory in the bin directory.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

  • Knowledge of the Wireless Control System configuration

  • Knowledge of the Cisco Light Weight Access Point Protocol (LWAPP) and the Cisco Unified Wireless solution

Components Used

The information in this document is based on a Cisco Wireless Control System that runs version 4.1.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

Dbadmin.bat Commands on WCS

The dbadmin.bat commands can be used in order to manage the WCS database. They can be used to perform functions, such as a manual backup of the database, a remote backup to an FTP server, the restoration of a database from the WCS backup, the restoration of a backup from the remote WCS FTP server, and the reinitialization of the WCS database, among others.

The dbadmin.bat commands are available under the WCS installation directory in the bin directory.

Example: C:\Program Files\WCS4.1\bin\dbadmin.bat

Note: If you use dbadmin.bat on Linux, the command is dbadmin.sh.

Some of the characteristics of dbadmin.bat commands include:

  • The dbadmin.bat commands automatically stop/start the WCS database server in order to execute the specified command.

  • If WCS needs to be shutdown in order to execute a command, the dbadmin.bat command instructs the user to shutdown WCS before the command runs. The user must do this manually, and then restart the WCS manually when the command completes.

    Note: There is an exception for this behavior. With the dbadmin.bat restore command, the user is informed that the WCS needs to be shut down, and then shuts down the WCS automatically with the consent of the user. Once the command execution completes, WCS restarts automatically.

These are the dbadmin.bat commands available with the WCS:

wcs-dbadmin-commands-1.gif

Of these commands, only these dbadmin commands can be used by end-users without direction from Cisco Technical Support:

  • reinitdb

  • backup

  • restore

  • remotebackup

  • restorefromftp

  • password

  • defrag

The other dbadmin commands must be used only when Cisco TAC engineers instruct a user to do so.

Reinitialize the WCS Database

If you reinitialize the WCS database, it clears any information contained in any tables. This means that the entire WCS database is wiped out and a new database is created.

Command Usage: dbadmin.bat reinitdb

In order to do this, complete these steps:

  1. Click Start > Programs > Wireless Control System > Stop WCS.

  2. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Issue the dbadmin.bat reinitdb command. This takes some time to process.

    3. When it is complete, restart the WCS with Start > Programs > Wireless Control System > Start WCS.

Here is an example:

C:\Program Files\WCS4.1\bin>dbadmin.bat reinitdb
All data will be lost.  Do you wish to continue? (y/n) y
Shutting down database server ...
Database server successfully shutdown.
Creating a new, empty database.
Database is now empty.
Starting database server ...
Database server is running.
Creating schema.  This may take a minute.
Creating Predefined ACL Protocols
Schema is successfully created.

Current Password Policy is as follows:

Password must be at least 8 characters long.
Password cannot contain username.
Password cannot contain reverse of username.
Password cannot be cisco.
Password cannot be reverse of cisco.
Root password cannot be the word public.
No character can be repeated more than three times consecutively in the password.
Password must contain characters from at least three of the classes: lower case
letters, upper case letters, digits and special characters.

Please enter the new wcs root user password:

Confirm Password:
Confirm Password:

Updated password for wcs root account.
Please enter new wcs ftp-user password:
Confirm password:
Confirm password:

Finished updating FTP User
Updated FTP password for wcs ftp-user account.

Perform a Manual Backup

You can use the dbadmin.bat backup command in order to perform a manual backup of the WCS database.

Command Usage: dbadmin.bat backup <backup-filename>

This section provides instructions on how to backup the WCS database on Microsoft Windows. Complete these steps in order to backup the WCS database on a Windows server.

  1. Log into the system as an administrator.

  2. Create a backup directory for the WCS database with no spaces in the name, such as C:\WCS-Backup.

    Note: Make sure that the directory name does not contain spaces. Spaces can generate errors.

  3. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Enter dbadmin.bat backup <backup-filename>, where the backup-filename is the full path of the backup directory that you created plus a name for the backup file, such as C:\WCS-Backup\backup1.

    3. A backup of the database is stored in the file.

Here is an example:

C:\Program Files\WCS4.1\bin>dbadmin.bat backup c:\WCS-Backup\backup1
Backing up the database ... to Temp\1190010455256
Database backup initiated.
Copying extra files ...
Database backup done.  Taring the backup files ...
Backup succeeded
Backup database done.

In this example, the backup file appears in the C:\WCS-Backup directory as backup1.nmsbackup.

Restore the WCS Database

You can use the dbadmin.bat restore command in order to manually restore an existing database to the WCS.

Complete these steps in order to restore the WCS database from a backup file on a Windows server.

  1. Log into the system as an administrator.

  2. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Enter dbadmin.bat restore <backup-filename>, where backup-filename is the full path and filename of the backup file, such as C:\WCS-Backup\backup1.nmsbackup.

    3. Type Yes if a message appears that indicates that the WCS runs and needs to be shut down.

    4. The WCS database is restored from the specified file.

      If the restore process shuts down the WCS, a restart is attempted after a successful restore.

Here is an example:

C:\Program Files\WCS4.1\bin>dbadmin.bat restore c:\WCS-Backup\backup1.nmsbackup
WCS server is running and needs to be shutdown.
Do you want to shut it down? (y/n) y
Stopping WCS
WCS server successfully shutdown.
The Wireless Network Management Application service is stopping....
The Wireless Network Management Application service was stopped successfully.

Shutting down database server ...
Database server successfully shutdown.
Untaring the backup file...
Copying files...
Temp dir is created..Temp\conf
Starting database server ...
Database server is running.
To Version 4.1.91.0
Invoking upgrade_general.sql
From Version 4.1.91.0
Restore done
Shutting down database server ...
Database server successfully shutdown.
De-fragmenting the database ...
Restore database succeeded.
Starting WCS
The Wireless Network Management Application service is starting..
The Wireless Network Management Application service was started successfully.

WCS server started successfully.

In order to restore data that is larger than 8 GB unzipped from a WCS version earlier than 4.0.97.0, the restore requires these steps:

  1. From the command prompt, change to the C:\Program Files\WCS4.X\bin directory.

  2. Enter dbadmin.bat. -gui -largedb restore. The usual restore database screen appears.

  3. Proceed as normal for a restore.

Perform a Remote Backup to an FTP Server

The dbadmin.bat remotebackup command allows the user to perform a backup and then FTP it to a remote FTP server. This is useful for users who want to keep their backups on a different server.

Command Usage: dbadmin.bat remotebackup <host> [user] [pass]

Complete these steps in order to backup the WCS database to a remote FTP server.

  1. Log into the system as an administrator.

  2. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Issue the dbadmin.bat remoteback <host> [user] [pass] command, where host is the IP address of the FTP server. User and Password are optional and default to admin.

Here is an example:

C:\Program Files\WCS4.1\bin>dbadmin.bat remotebackup 10.77.244.199 admin admin
Backing up the database ... to Temp\1190119704250
Database backup initiated.
Copying extra files ...
Database backup done.  Taring the backup files ...
Backup succeeded
Backup resides on host=10.77.244.199 dir=<FTP Root Dir>/remote_nms/nms_backup_of_ts-web.nmsbackup

Restore the Database from an FTP Server

The dbadmin.bat restorefromftp command can be used on the remote side in order to shut down the WCS, restore the latest backup from the WCS FTP directory, and then restart the WCS.

Command Usage: dbadmin.bat restorefromftp <host>

Complete these steps in order to restore the WCS database from a remote FTP server.

  1. Log into the system as an administrator.

  2. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Issue the dbadmin.bat restorefromftp <host> command, where host is the IP address of the server on which the backup is stored.

Change the WCS Database Password

When the WCS is installed, the database password is also generated. In order to change the WCS database password that WCS uses internally to access the database, issue this command.

Command Usage: dbadmin.bat password <password>

Complete these steps in order to change the password of the WCS database.

  1. Log into the system as an administrator.

  2. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Issue the dbadmin.bat password <password> command.

    3. The password of the WCS database changes.

Here is an example:

C:\Program Files\WCS4.1\bin>dbadmin.bat password cisco123
This will change the password to access the database.  Do you wish to continue?
(y/n) yes

Defragment the WCS Database

Defragmentation can be used in order to tune performance. Defragmentation is particularly helpful to restore lost performance, especially when database sizes tend to become large, greater than 1 GB, for example.

When you defragment the database, you can reclaim allocated but unused disk space. A database defragmentation can be beneficial if free disk space on the system runs low due to a large database size or if the response time of the WCS application is noticeably slower when data is requested from it.

Another point in favor of defragmentation is, as the name implies, defragmentation makes all used and unused space contiguous, as long as all database space was allocated contiguously by the operating system originally.

The contiguous unused/unused space improves performance, because less pages must be read from the disk on average.

Complete these steps in order to defragment the WCS database.

  1. Log into the system as an administrator.

  2. In order to stop the WCS, click Start > Programs > Wireless Control System > Stop WCS.

  3. Complete these steps from the command prompt:

    1. Navigate to the WCS installation directory at C:\Program Files\WCS4.1\bin.

    2. Issue the dbadmin.bat defrag command.

    3. This takes some time to process. When it is complete, restart the WCS with Start > Programs > Wireless Control System > Start WCS.

Command Usage: dbadmin.bat defrag

Here is an example:

C:\Program Files\WCS4.1\bin>dbadmin.bat defrag
De-fragmenting the database started.
De-fragmenting the database ended

When the -info keyword is used, the system gives information on the database size and the free space available.

C:\Program Files\WCS4.1\bin>dbadmin.bat -info defrag
Database size = 6.27MB    Free space = 0.19MB    % Free space = 2.99%

NetPro Discussion Forums - Featured Conversations

Networking Professionals Connection is a forum for networking professionals to share questions, suggestions, and information about networking solutions, products, and technologies. The featured links are some of the most recent conversations available in this technology.
NetPro Discussion Forums - Featured Conversations for Wireless
Wireless - Mobility: WLAN Radio Standards
Wireless - Mobility: Security and Network Management
Wireless - Mobility: Wireless IP Voice and Video
Wireless - Mobility: Getting Started with Wireless
Wireless - Mobility: General

Related Information



Updated: Jan 21, 2008Document ID: 99118