Cisco DCNM Installation and Licensing Guide, Release 6.x
Installing the Database for Cisco DCNM
Downloads: This chapterpdf (PDF - 181.0KB) The complete bookPDF (PDF - 3.54MB) | Feedback

Installing the Database for Cisco DCNM

Table Of Contents

Installing the Database for Cisco DCNM

Information About the Database

Directory Structure

Oracle Database Preparation

PostgreSQL Database Preparation

Backing Up the Database

Oracle

PostGRES

Preparing an Oracle Database

Information About the Oracle SQL*Plus Command-Line Tool

Linux Environment Variables

Logging Into Oracle

Information About the init.ora File

Increasing the SYSTEM Tablespace

Increasing the Number of Sessions and Processes to 150 Each

Increasing the Number of Open Cursors to 1000

Creating an Oracle DB User using the Command Prompt

Preparing a PostgreSQL Database

Installing Oracle

Increasing the UDP Buffer Size

Backing Up and Restoring the Database

Clearing Cisco DCNM Databases

Procedure for Non-federation Deployments

Procedure for Deployments with Federations


Installing the Database for Cisco DCNM


This chapter describes how to install the database for Cisco DCNM and includes the following sections:

Information About the Database

Preparing an Oracle Database

Preparing a PostgreSQL Database

Information About the Database

Before you install Cisco DCNM, you must install a database. You can install PostgreSQL by using Cisco DCNM installer from Cisco.com. If the PostgreSQL database is present in your computer, the Cisco DCNM installer will upgrade it to the latest version.


Note From Cisco DCNM Release 6.x, the database server can reside on the same subnet as the Cisco DCNM server.


Directory Structure

By default, the Cisco DCNM components are installed on your computer's hard drive, in the C:\Program Files\ folder. The installation path is the root directory on your computer, such as C:\Program Files\Cisco Systems. Cisco DCNM and databases are installed in application directories, such as C:\Program Files\Cisco Systems\DCM\DCNM. Table 2-1 and Table 2-2 describe the directory structure for Windows, and UNIX operating systems.

DCNM_HOM> = C:\Program Files\Cisco Systems

Table 2-1 Directory Structure (Windows)

Directory
Description

C:\Program Files\Cisco Systems\

Home directory for Cisco products.

DCNM_HOME\DCM\

Home directory for Cisco Data Center Management products.

DCNM_HOME\DCM\fm\

Home directory for Cisco DCNM-SAN.

DCNM_HOME\DCM\DCNM

Home directory for Cisco DCNM-LAN.

DCNM_HOME\DCM\SMIS

Home directory for SMI-S.

DCNM_HOME\DCM\JBOSS-4.2.2.GA

Home directory for JBoss (Cisco DCNM Server infrastructure ).

DCNM_HOME\DCM\DB

Home directory for database (PostgreSQL).

DCNM_HOME\DCM\java\jre1.6

Home directory for Java Runtime Environment.

DCNM_HOME\DCM\JBOSS-4.2.2.GA\SERVER\DCNM

Home directory for Cisco DCNM Servers.

DCNM_HOME\DCM\DCNM\DATA

Directory that contains templates, configuration files for configuration delivery, and archive.


DCNM_HOME= /usr/local/cisco

Table 2-2 Directory Structure (Unix)

Directory
Description

/usr/local/cisco

Home directory for Cisco products.

DCNM_HOME/DCM/

Home directory for Cisco Data Center Management products.

DCNM_HOME\DCM\DCNM

Home directory for Cisco DCNM-SAN.

DCNM_HOME\DCM\fm\

Home directory for Cisco DCNM-LAN.

DCNM_HOME\DCM\SMIS

Home directory for SMI-S.

DCNM_HOME\DCM\JBOSS-4.2.2.GA

Home directory for JBoss (Cisco DCNM Server infrastructure).

DCNM_HOME\DCM\DB

Home directory for database (PostgreSQL).

DCNM_HOME\DCM\java\jre1.6

Home directory for Java Runtime Environment.

DCNM_HOME\DCM\JBOSS-4.2.2.GA\SERVER\DCNM

Home directory for Cisco DCNM Servers.

DCNM_HOME\DCM\DCNM\DATA

Directory that contains templates, configuration files for configuration delivery, and archive.


Oracle Database Preparation

If you plan to use an Oracle database, Cisco DCNM-LAN requires that some Oracle database configuration settings exceed the Oracle default values. Table 2-3 and Table 2-4 list the specific requirements for each supported Oracle database.

Table 2-3 Oracle 10g Database Configuration Requirements

Oracle Setting
Oracle Default
Cisco DCNM-LAN Minimum Requirement

SYSTEM tablespace

1 GB

2 GB

Sessions

50

150

Processes

50

150

Open cursors

50

1000


Table 2-4 Oracle 11g Database Configuration Requirements

Oracle Setting
Oracle Default
Cisco DCNM-LAN Minimum Requirement

Sessions

50

150

Processes

50

150

Open cursors

300

1000


PostgreSQL Database Preparation

If you plan to use a PostgreSQL database that is remote to any Cisco DCNM-LAN server in your deployment, you must ensure that the PostgreSQL server software is configured to permit remote connections from Cisco DCNM-LAN server systems. The pg_hba.conf file in a PostgreSQL database installation controls whether remote connections are allowed. You must ensure that the records in the pg_hba.conf file permit connections from remote Cisco DCNM-LAN server systems prior to installing Cisco DCNM-LAN.


Note When PostgreSQL is chosen as the database, ensure that the Microsoft Windows user installing the software has administrative privileges and not the domain admin privileges. This prerequisite is important for a successful installation.


For more information about the pg_hba.conf file, see the documentation for your PostgreSQL server or see the following location:

http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html

Backing Up the Database

When Cisco DCNM database server is installed on a machine different from the Cisco DCNM server, follow the procedure below to bac kup the Oracle or Postgres database.

Oracle

Copy the oracle backup script from the Cisco DCNM server directory DCNM_SERVER_Install/dcm/dcnm/bin.

For Linux, the script name is backup-oracle-dcnm-db.sh and edit the DB_HOME variable to point to the Oracle installation.

For Windows, the script name is backup-oracle-dcnm-db.bat and edit DB_HOME variable to point to the Oracle installation.

Use the following path for Oracle DBHOME:

On Linux- /usr/lib/oracle/xe/app/oracle/product/10.2.0/server


Note Replace /usr/lib/oracle with the Oracle installation path.


On windows-C:\oraclexe\app\oracle\product\10.2.0\server


Note Replace C:\oraclexe with the Oracle installation path.


PostGRES

Copy the PostGRES backup script from the Cisco DCNM server directory DCNM_SERVER_Install/dcm/dcnm/bin.

For Linux, the script name is backup-postgres-dcnm-db.sh and edit the DB_HOME variable to point to the Oracle installation.

For Windows, the script name is backup- postgres -dcnm-db.bat and edit the DB_HOME variable to point to the Oracle installation.

Use the following path for Postgres DBHOME:

On Linux- /usr/local/cisco/dcm/db


Note Replace /usr/lib/oracle with the PostGRES installation path.


On Windows-C:\Program Files\Cisco Systems\dcm\db


Note Replace C:\oraclexe with the PostGRES installation path.


Preparing an Oracle Database

You can prepare an Oracle database for use by Cisco DCNM-LAN.

DETAILED STEPS


Step 1 (Oracle 10g only) Increase the SYSTEM tablespace to 2 GB from the default of 1 GB. For more information, see the "Increasing the SYSTEM Tablespace" section.

Step 2 Increase the number of sessions and processes to 150 each. For more information, see the "Increasing the Number of Sessions and Processes to 150 Each" section.

Step 3 Increase the number of open cursors to 1000. For more information, see the "Increasing the Number of Open Cursors to 1000" section.


Information About the Oracle SQL*Plus Command-Line Tool

The Oracle database procedures in this section require the use of the SQL*Plus command-line tool. The SQL*Plus executable is typically installed in the bin directory under the Oracle home directory. In Microsoft Windows, the default location for the SQL*Plus executable is as follows:

C:\oraclexe\app\oracle\product\10.2.0\server\bin

In Linux, the default location for the SQL*Plus binary file is as follows:

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin

Linux Environment Variables

If you are using Linux, before you use the SQL*Plus command-line tool, ensure that the ORACLE_HOME and ORACLE_SID environment variables are set to correct values. For example, if you are using Oracle 10g on Linux, the following commands set the environment variables to the default Oracle home directory and SID if you are using a bash shell:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_SID=XE
 
   

Logging Into Oracle

You can log into the Oracle database by using the SQL*Plus command-line tool.

BEFORE YOU BEGIN

Ensure that you know the database administrator username and password.

DETAILED STEPS


Step 1 Run the SQL*Plus executable.

A command prompt appears.

Step 2 Enter the connect command.

The Username prompt appears.

Step 3 Enter the database administrator username.

The Password prompt appears.

Step 4 Enter the password for the username that you specified.

For example, if the Oracle administrator username is system and the password is oracle, you would log in as follows:

Username: sys as sysdba
Password: oracle
 
   

For more information about using SQL*Plus, see the documentation for the Oracle database version that you are using.

Information About the init.ora File

The init.ora file specifies startup parameters. The default name and location of the file is platform specific, as shown in Table 2-5.

Table 2-5 Name and Default Location of init.ora File 

Oracle Version
Operating System
Content of init.ora File

10g

Microsoft Windows

C:\oraclexe\app\oracle\product\10.2.0\server\database\initXE.ora

Linux

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs\initXE.ora

11g

Microsoft Windows

C:\app\Administrator\product\11.1.0\db_1\dbs\initORCL.ora

Linux

/usr/lib/oracle/orcl/app/oracle/product/11.1.0/db_1/dbs/initORCL.ora


The init.ora file should contain only one line, which is the full path of the server parameter file, as shown in Table 2-6.

Table 2-6 Content of init.ora File 

Oracle Version
Operating System
Content of init.ora File

10g

Microsoft Windows

SPFILE='C:\oraclexe\app\oracle\product\10.2.0\server\dbs\spfileXE.ora

Linux

SPFILE='/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs/spfileXE.ora'

11g

Microsoft Windows

SPFILE='C:\oraclexe\app\oracle\product\11.1.0\server\dbs\spfileXE.ora

Linux

SPFILE='/usr/lib/oracle/orcl/app/oracle/product/11.1.0/db_1/dbs/spfileXE.ora


Increasing the SYSTEM Tablespace

You can increase the SYSTEM tablespace.

DETAILED STEPS


Step 1 Use the SQL*Plus command-line tool to log in to the Oracle database. For more information, see the "Information About the Oracle SQL*Plus Command-Line Tool" section.

Step 2 Enter the following command:

select file_name, bytes, autoextensible, maxbytes
from dba_data_files
where tablespace_name='SYSTEM';
 
   

Step 3 Enter the following command:

alter database datafile `filename' autoextend on next 100m maxsize 2000m;
 
   

where file_name is the filename from the output of the select command in Step 2.

The SYSTEM tablespace is increased.

Step 4 Enter the exit command.


Increasing the Number of Sessions and Processes to 150 Each

You can increase the number of sessions and processes to 150 each.

DETAILED STEPS


Step 1 Ensure that the init.ora file exists and that it contains the single line that is applicable for your Oracle database installation. If there are additional lines, remove them.

For more information, see the "Information About the init.ora File" section.

Step 2 Use the SQL*Plus command-line tool to log in to the Oracle database. For more information, see the "Information About the Oracle SQL*Plus Command-Line Tool" section.

Step 3 Shut down the system by entering the shutdown command. If the command fails, use the shutdown abort command.

Step 4 Enter the following command:

startup pfile='init_file_name';
 
   

where init_file_name is the init.ora filename for your Oracle database installation. For more information, see the "Information About the init.ora File" section.

Step 5 Set the number of sessions to 150 by entering the following command:

alter system set sessions = 150 scope=spfile;
 
   

Step 6 Set the number of processes to 150 by entering the following command:

alter system set processes = 150 scope=spfile;
 
   

Step 7 Shut down the system by entering the shutdown command. If the command fails, use the shutdown abort command.

Step 8 Start up the system by entering the startup command.

Step 9 Verify that the number of sessions and processes is changed to 150 by entering the following command:

show parameter sessions
 
   

Step 10 Exit by entering the exit command.


Increasing the Number of Open Cursors to 1000

You can increase the number of open cursors to 1000.

DETAILED STEPS


Step 1 Ensure that the init.ora file exists and that it contains the single line that is applicable for your Oracle database installation. If there are additional lines in the file, remove them.

For more information, see the "Information About the init.ora File" section.

Step 2 Use the SQL*Plus command-line tool to log in to the Oracle database. For more information, see the "Information About the Oracle SQL*Plus Command-Line Tool" section.

Step 3 Shut down the system by entering the shutdown command. If the command fails, use the shutdown abort command.

Step 4 Enter the following command:

startup pfile='init_file_name';
 
   

where init_file_name is the init.ora filename for your Oracle database installation. For more information, see the "Information About the init.ora File" section.

Step 5 Set the number of open cursors to 1000 by entering the following command:

alter system set open_cursors = 1000 scope=spfile;
 
   

Step 6 Shut down the system by entering the shutdown command. If the command fails, use the shutdown abort command.

Step 7 Start up the system by entering the startup command.

Step 8 Verify that the number of open cursors is changed to 1000 by entering the following command:

show parameter open_cursors
 
   

Step 9 Exit by entering the exit command.


Creating an Oracle DB User using the Command Prompt

To create an Oracle DB user using the command prompt, follow these steps:

export ORACLE_SID=XE
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
cd $ORACLE_HOME/bin
sqlplus
sys as sysdba
create user dcnmdbusername identified by dcnmdbuserpassword default tablespace users 
temporary tablespace temp;
grant connect, resource to dcnmdbusername;
grant create session to dcnmdbusername;
grant dba to dcnmdbusername;

Note Ensure you set the Oracle_SID and Oracle_Home and enter the values for the DB Username and password fields.


Preparing a PostgreSQL Database

This procedure describes how to configure the PostgreSQL server to permit connections from Cisco DCNM-LAN server systems that are remote to the PostgreSQL server system.

For more information about the pg_hba.conf file, see the documentation for your PostgreSQL server or see the following location:

http://www.postgresql.org/docs/8.2/interactive/auth-pg-hba-conf.html

BEFORE YOU BEGIN

Ensure that the PostgreSQL server is a supported version of PostgreSQL. If you used the Cisco DCNM installer software to install the PostgreSQL server, the version of PostgreSQL is supported. For information about supported databases, see the Cisco DCNM Release Notes, Release 5.x.

Determine the IP address of the Cisco DCNM-LAN servers that are remote to the PostgreSQL database server system.

DETAILED STEPS


Step 1 Stop the PostgreSQL database service.

Step 2 Go to the data directory in the PostgreSQL server installation location. In Microsoft Windows, the default location of the data directory for PostgreSQL 8.2 is C:\Program Files\PostgreSQL\8.2\data.

Step 3 In the data directory, use a text editor to open the pg_hba.conf file.

Step 4 In the pg_hba.conf file, locate the connection records for IPv4 connections.

Step 5 For each Cisco DCNM-LAN server system that is remote to the PostgreSQL server system, add one record, as follows:

host all all IP-address/32 md5
 
   

where IP-address is the IPv4 address of the Cisco DCNM-LAN server system.


Tip If you want to allow all remote connections, add the following single record:
host all all 0.0.0.0/0 md5


Step 6 Save and close the pg_hba.conf file.

Step 7 Start the PostgreSQL database service.


Installing Oracle

DETAILED STEPS


Step 1 Click the following link to install Oracle Database.

http://www.oracle.com/technology/software/products/database/xe/index.html


Note If you have another instance of Oracle already installed on a PC and you want to install Oracle database on the same computer, then you must ensure that you have sufficient memory and CPU space available.


Step 2 Run OracleXE.exe to install the Oracle database. Set the password for the system user. The database administrator uses the password to manage and administer Oracle Database 10g Express server, which is installed by the Oracle installer.

Step 3 Finish the installation and verify that both services (OracleServiceXE and OracleXETNSListener) are running from the Services window.

Step 4 Run the following script to do the following:

a. Change the default Oracle admin port to 8082.

b. Create a database account. This example shows how to create a new user scott with the password tiger. You need to keep these login credentials because they are required at a later point in the installation process.

C:\> cd c:\oraclexe\app\oracle\product\10.2.0\server\bin
C:\oraclexe\app\oracle\product\10.2.0\server\bin>sqlplus / as sysdba
SQL> exec dbms_xdb.sethttpport(8082);
SQL> GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO SCOTT IDENTIFIED BY
TIGER;
SQL>ALTER USER scott default tablespace USERS quota unlimited on USERS;
SQL> EXIT;
 
   

Note The Oracle Database 10g Express option is only supported on Microsoft Windows. It is not supported on UNIX systems.



To install Oracle Real Application Clusters (RAC), see http://docs.oracle.com/html/B13829_01/toc.htm.


Note For information about backing up the Oracle database, go to this location:
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/backrest.htm#i1004902.

You can also use the exp/imp utility at this location:
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/impexp.htm#BCEEDCIB.


If you are using the Oracle database, you must install the Oracle JDBC (Java Database Connectivity) component for Cisco DCNM to connect to the database.

Increasing the UDP Buffer Size

If the Cisco DCNM SNMP packet log shows an SNMP VarBind decode error, the UDP buffer size is low and the buffer size needs to be increased.

To increase the UDP buffer size, add the following setting in /etc/system, so that the buffer size is in effect even after a reboot.

set ndd:udp_recv_hiwat=65535 
set ndd:udp_xmit_hiwat=65535

Note Before starting the installation, make sure that you have logged in as a superuser.


Backing Up and Restoring the Database

From Cisco DCNM 6.x release, you need not enter the database administrator credentials during Cisco DCNM installation.

However, if you are using the script below to restore the database, you need the database administrator credentials.


Note The database administrator credentials fields are highlighted.


set DBHOME="C:\Program Files\Cisco Systems\dcm\db"
set PGBIN="%DBHOME%\bin"
set PGLOGINUSER="admin"
set PGLOGINPASSWORD="admin"
set PGUSER1="testuser123"
set PGPASSWORD1="testuser123"
set PGDATABASE1="dcmdb"

Clearing Cisco DCNM Databases

This section describes how to clear the Cisco DCNM database tables for both Cisco DCNM-LAN and Cisco DCNM-SAN. The procedure is different for deployments with and without federations.

Procedure for Non-federation Deployments

DETAILED STEPS


Step 1 Stop the Cisco DCNM servers

Step 2 For Cisco DCNM installed on Windows, run the script clean-dcnm-db.bat file that is at the following location:

INSTALL_DIR\dcm\dcnm\bin.

where INSTALL_DIR is the Cisco DCNM installation directory.

For Cisco DCNM installed on Linux, run the script clean-dcnm-db.sh file that is at the following location:
INSTALL_DIR/dcm/dcnm/bin

For example:

clean-dcnm-db.bat new_username new_password

where the arguments are the new DCNM login user name and the new DCNM login password to be set for the database.


Procedure for Deployments with Federations

DETAILED STEPS


Step 1 Stop the Cisco DCNM servers.

Step 2 For Cisco DCNM installed on Windows, run the script clean-dcnm-db.bat file that is at the following location:

INSTALL_DIR\dcm\dcnm\bin

where INSTALL_DIR is the Cisco DCNM installation directory.

For Cisco DCNM installed on Linux, run the script clean-dcnm-db.sh file that is at the following location:

INSTALL_DIR/dcm/dcnm/bin

For example:

clean-dcnm-db.bat new_username new_password

where the arguments are the new DCNM login user name and the new DCNM login password to be set for the database.

Step 3 Run the following scripts on the Cisco DCNM servers that are part of a federation where clean-db-script is not executed.

a. For windows, run the script PLMapping.bat file that is located at:

INSTALL_DIR\dcm\fm\bin

For example:

PLMapping.bat -p <dcnm server ip> <server#>

b. For Linux, run the script PLMapping.sh file that is located at:

INSTALL_DIR/dcm/fm/bin

For example:

./PLMapping.sh -p <dcnm server ip> <server#>

In the examples server# is the Cisco DCNM server number. It is 1 for the second node in the federation, 2 for the third node in the federation, and so on.

Consider a case where you have three servers, namely, server1, server2, and server3 in a federation and cluster setup. You are running the clean-db script from server2, and running PLMapping.bat on server1 and server3:

PLMapping.bat -p <dcnm server ip> <server#>

where, <dcnm server ip> will be the IP address of the DCNM server node where PLmapping.bat is executed. It should not be the IP address of the DCNM server where the clean-db script is executed.