Preparing for the Installation

This chapter describes the steps required to set up your Oracle Database 11g server and to set up the Cisco Configuration Engine with Prime Provisioning.

Setting Up Oracle for Prime Provisioning

Prime Provisioning comes with an embedded Sybase DBMS. This section is relevant to you only if you choose to use an external Oracle DBMS. You are responsible for the installation, licensing, and administration of the Oracle DBMS.
This section describes how to set up an Oracle Database 11g (Enterprise Edition Release 11.2.0.3.0 - 64 bit Production server) and Oracle Database 12c (Enterprise Edition 12.1.0.2.0 - 64 bit Production server) that works with Cisco Prime Provisioning. This section is intended for database administrators who are familiar with Oracle.

note.gif

Noteblank.gif Prime Provisioning 7.2 was tested with Oracle Database 11g, Enterprise Edition Release 11.2.0.3.0 - 64 bit Production and Oracle Database 12c, Enterprise Edition 12.1.0.2.0 - 64 bit Production. If you would like to use another version of Oracle, see Oracle’s compatibility information.


This chapter does not cover all the details about installing and setting up this Oracle server. For the complete information, see the Oracle Installation Guide. Prime Provisioning provides schema files to be loaded on an Oracle server. The Prime Provisioning customer must decide on the Oracle server configuration.

1.blank.gif Prerequisites

2.blank.gif Installing Oracle

3.blank.gif Verifying and Launching Oracle

4.blank.gif Setting Up Your Oracle Files

5.blank.gif Testing Your Oracle Database Connection for Oracle User Prime

6.blank.gif Prime Provisioning Software Installation

7.blank.gif Verify Prime Provisioning Installation with Oracle

8.blank.gif Importing an Oracle Repository Dump

9.blank.gif Configuring Oracle RAC

10.blank.gif Backup of Oracle Database

This section also contains a “Troubleshooting” section.

Prerequisites

Prime Provisioning support for an Oracle database is for Oracle Database 11g (Enterprise Edition Release 11.2.0.3.0 - 64 bit Production) and Oracle Database 12c (Enterprise Edition 12.1.0.2.0 - 64 bit Production). This is the version of Oracle with which Prime Provisioning 7.2 was tested. If you would like to use another version, see Oracle’s compatibility information.

The remaining prerequisites are as specified in the following Cisco Prime Provisioning 7.2 steps:


Step 1blank.gif You must install Oracle and Prime Provisioning on different servers connected to the same network.

Step 2blank.gif When the Oracle server is set up, the following initialization parameters should be in the database init file:

  • db_block_size = 8192 or larger
  • compatible = “11.2.0.3.0” or “12.1.0.2.0”
  • open_cursors = 512 or larger
  • processes = 150 or larger

Step 3blank.gif Record the following information about the server setup. This information is needed during the Prime Provisioning installation:

  • Oracle server name
  • Oracle server instance identifier (SID)
note.gif

Noteblank.gif This is specified in Step 18, “Installing Prime Provisioning Using the GUI Installer”, Chap: 3.


  • Database port number for client connections (default: 1521)
  • Oracle user ID and password created for Prime Provisioning
note.gif

Noteblank.gif Create an Oracle database userid and password. This is needed during Prime Provisioning installation. Do not use the system or sys account for Prime Provisioning data. Use a separate table space other than the system table space.


Step 4blank.gif Before loading the Prime Provisioning database schema, make sure the Oracle database has been successfully started and the database user has proper privileges. See the Oracle Administration Guide for detailed instructions about how to set up the database and manage user accounts.

Step 5blank.gif Proceed to the section “Installing Oracle.”


 

Installing Oracle

The following information about an Oracle installation is just one example.

You must install Oracle before you install the Cisco Prime Provisioning software (or at least know your Oracle home directory, host machine, and Oracle Server ID), and your database and its listener must be running when you launch the Prime Provisioning servers.

If you intend to use the same Oracle installation with more than one installation of the Prime Provisioning servers, you must create a unique Oracle SID and Oracle tablespace for each Prime Provisioning installation.

initORACLE_SID.ora

This file should already exist in the /dbs subdirectory of your Oracle installation. (The filename contains your database’s SID in place of ORACLE_SID. For example, if you named your database PP, this file is named initPP.ora.)

oratab

The oratab file should be located in the /var/opt/oracle directory on the machine on which the database is installed. It is used by Oracle’s dbstart utility to identify your database.

The oratab file must contain the following line:

database_name : location_of_your_Oracle_executables :Y

If your Oracle home directory is /oracle/10.2.0 and your database SID is PP, the oratab entry would be as follows:

PP:/oracle/10.2.0:Y

This file identifies the name and location of your database for the Oracle utility dbstart (and its companion dbshut). The dbstart utility starts Oracle; the “Y” at the end of the oratab entry tells the dbstart utility to open the database named Prime Provisioning. (Substitute your database name for Prime Provisioning in the sample. List the path to your Oracle installation as an absolute path, not a relative path.)

To make this happen automatically following a reboot (after a power interruption, for example), execute the dbstart utility from a script in the /etc/init.d directory on the Oracle host machine.

sqlnet.ora

The SQLNET.ALLOWED_LOGON_VERSION parameter is deprecated in Oracle 12c database. It has been replaced with two new Oracle Net Service parameters:

SQLNET.ALLOWED_LOGON_VERSION_SERVER

SQLNET.ALLOWED_LOGON_VERSION_CLIENT

In Oracle 11g database, SQLNET.ALLOWED_LOGON_VERSION is 8 by default. But when you are upgrading it to Oracle 12c database, the SQLNET.ALLOWED_LOGON_VERSION_SERVER is set to 11 by default. For installing Prime Provisioning successfully, you have to set this value to 8 manually in the sqlnet.ora file present in the $ORACLE_HOME/network/admin directory as below:

SQLNET.ALLOWED_LOGON_VERSION_SERVER=8

Verifying and Launching Oracle

Your Oracle database must be open before you can install or use the Prime Provisioning software.

First, verify the Oracle processes, as described in the following section. If the processes are running, you can skip the succeeding section.

Verifying Oracle Processes

Log into the Oracle host machine and enter the following on the command line to see if the Oracle processes are running:

ps -ef | grep ora_

ps -ef | grep tnslsnr

If there is no output displayed from the ps command, Oracle is not running.

If Oracle is running and the listener process is running, you should see something similar to the following:

oracle 328 1 0 14:25:18 0:00 ora_pmon_ISC

oracle 328 1 0 14:25:18 0:00 ora_dbwr_ISC

oracle 328 1 0 14:25:18 0:00 ora_lgwr_ISC

oracle 328 1 0 14:25:18 0:00 ora_ckpt_ISC

oracle 328 1 0 14:25:18 0:00 ora_smon_ISC

oracle 328 1 0 14:25:18 0:00 ora_reco_ISC

oracle 328 1 0 14:25:18 0:00 ora_wmon_ISC

oracle 328 1 0 14:25:18 0:00 tnslsnr LISTENER -inherit

These are the Oracle processes currently running (your output might not match this list exactly, depending on which Oracle components are installed).

Launching Oracle and Opening Your Database

Your Oracle database must be open before you can install or use the Prime Provisioning software.

If Oracle is not currently running, you must use the startup utilities located in the /bin subdirectory of your Oracle installation.

To open your database, you must be logged into the Oracle host workstation under the Oracle administrator (DBA) user ID; you then locate your $ORACLE_HOME/bin subdirectory.

On the command line, enter the following:

dbstart

The dbstart script starts the database identified in the oratab file. If the database starts successfully, you should see several lines of output, including the following:

SQL> Connected to an idle instance.

SQL> ORACLE instance started.

...and ending with the following:

Server Manager Complete.

Database "Prime Provisioning" warm started.

If the listener process is not running, you must also start that process. On the command line, enter the following:

lsnrctl start

You should see several lines of output as the process is invoked, then you should see output similar to the following:

Services Summary...

Prime Provisioning has 1 Service handler(s)

The command completed successfully.

Setting Up Your Oracle Files

To configure your database to work with the Prime Provisioning software, you must create a tablespace and configure several files.

You must be logged into the Oracle host using the user ID (such as oracle) created during the Oracle installation procedure.

Oracle Tablespace Requirements

You must create an Oracle tablespace for your Prime Provisioning tables.

To create the tablespace, Oracle must be running and your database must be open.

Log into the Oracle host using the oracle user ID. Identify (or create) the directory where your Prime Provisioning data should be stored, and grant write permission to the oracle user ID. Be sure your ORACLE_SID and ORACLE_HOME environment variables are set correctly, then launch the Oracle utility sqlplus, which is located in the $ORACLE_HOME/bin directory.

At the SQL prompt, enter the following on the command line:

connect / as sysdba;

CREATE TABLESPACE PP_DAT

DATAFILE '/ your_data_directory /ISC_DAT_01.dbf' size 500M

autoextend on

next 50M

maxsize unlimited;

The data directory you specify must already exist. The TABLESPACE and DATAFILE names are arbitrary. You can use any names that help you keep track of which files are associated with which database. The only requirement is that the name given to the tablespace at the time of its creation ( PP_DAT in the example) must be the same as the default tablespace listed when you create the prime user account.

The autoextend option allows ORACLE to automatically extend your data file. The maximum size of the data file is limited only by the available space on the file’s disk.

prime Oracle User Account

Before invoking an Oracle installation, you need to grant ‘create and view’ permissions to an Oracle user. To grant these permissions, execute the SQL query as shown in the following steps:

While sqlplus is still running, create a prime user account using your PP_DAT tablespace as follows:

CREATE USER prime IDENTIFIED BY cisco

DEFAULT TABLESPACE PP_DAT;

GRANT CONNECT TO prime;

GRANT RESOURCE TO prime;

GRANT CREATE VIEW TO prime;

GRANT SELECT ON sys.dba_constraints TO prime;

You should use the username and password created in these steps when entering Oracle information in the script prime.configure.

note.gif

Noteblank.gif In Oracle 11g, creating a user with the role specified as “Resource” grants UNLIMITED TABLESPACE privilege by default to the user. But in Oracle 12c specifying the role as “Resource” does not grant UNLIMITED TABLESPACE privilege by default. So you need to manually set this option as follows: alter user <user> quota unlimited on <table_space>;


Testing Your Oracle Database Connection for Oracle User Prime

When you have configured your database and listener file, enter the following (for the Oracle user prime and for the database named Prime Provisioning) on the command line:

sqlplus <username> / <password>

<username> is a database username (in our previous example, we used prime).

<password> is a database password (in our previous example, we used cisco).

If your system is set up properly (and your Oracle database is running), you should see a message advising you that you are connected to Oracle. Enter quit on the command line to exit the database.

Prime Provisioning Software Installation

note.gif

Noteblank.gif The Prime Provisioning database schema files are loaded during the installation.


Perform the following:


Step 1blank.gif Follow the custom install instructions in “Installing Prime Provisioning” section, and log in, as explained in the “Logging In for the First Time” section.

Step 2blank.gif Proceed to the section “$paratext>” section.


 

Verify Prime Provisioning Installation with Oracle

To verify the Prime Provisioning installation with Oracle, do the following:


Step 1blank.gif Run sqlplus <oracle_id> / <oracle_password> on the Oracle server.

Step 2blank.gif From the SQL> prompt, run select host_name from vpnsc_host;

This command returns the installed Prime Provisioning hostname.

Step 3blank.gif Log into the Prime Provisioning server.

Step 4blank.gif Check the file /opt/Prime Provisioning /etc/vpnsc.properties and make sure that the <oracle server> and <ORACLE_SID> are correct in the following entry in the file:

repository.persistence.url=jdbc:oracle:thin:@ <oracle server> : <ORACLE_SID>

Step 5blank.gif Execute the schema verification script to verify the repository schema version, as follows:

cd $PRIMEF_HOME

cd /bin

./checkSchemaVer.sh <oracle_id> / <oracle_password>

where: <oracle_id> is the Prime Provisioning userid in the Oracle database and <oracle_password> is its password.

Step 6blank.gif The output from the script should be “Current schema version = 6.8”. If that is not the output from the script, Prime Provisioning might not have been installed properly or the Prime Provisioning repository might not have been upgraded successfully.


 

Importing an Oracle Repository Dump

To import the Oracle repository dump in Prime Provisioning, do the following:


Step 1blank.gif Log into the Oracle Webapp.

Step 2blank.gif Create the User and Tablespace.

Step 3blank.gif Log into the Oracle Server and source the enviornment:

rlogin <Oracle Server Name>
 

where:

<Oracle Server Name> Specify the Oracle Server Name that is being used.

Step 4blank.gif Enter: su - <user name>

Step 5blank.gif Enter: cd $ORACLE_HOME/bin

Step 6blank.gif Enter: source coraenv

Step 7blank.gif Enter: setenv ORACLE_HOME to $ORACLE_HOME/bin

Step 8blank.gif Enter: setenv ORACLE_SID to orcl

Step 9blank.gif Copy the.dmp file to a directory on the Oracle Server.

Step 10blank.gif Enter: cd $ORACLE_HOME/bin

Step 11blank.gif Run the command: imp

When you run this script, you are asked to enter the values for the following prompts:

a.blank.gif Import file: <specify the full path to.dmp file>

b.blank.gif Enter insert buffer size: 30720 (accept the default value)

c.blank.gif List contents of import file only: no (accept the default value)

d.blank.gif Ignore create error due to object existence: no (accept the default value)

e.blank.gif Import grants: no (accept the default value)

f.blank.gif Import table data: yes

g.blank.gif Import entire export file: yes


 

Configuring Oracle RAC

In addition to having already installed Prime Provisioning and followed the steps required to configure an Oracle server, you must follow these steps when using Oracle Real Application Clusters (RAC). Prime Provisioning does not support client load balancing with Oracle RAC.

note.gif

Noteblank.gif A limitation of Oracle RAC is that any uncommitted transactions made during an instance or node failure and recovery period are lost. The recovery of these transactions is not supported. For this reason, the behavior of tasks that are running at the time as an instance or node fail over is undetermined. These tasks should be redeployed.

In case of a failure, for more information see the Oracle RAC documentation for database instance recovery time details.



Step 1blank.gif Verify that the new Oracle RAC servers are available and have an Prime Provisioning tablespace with user configured. If you need help setting this up, see the “$paratext>” section.

Step 2blank.gif Modify $PRIMEF_HOME/runtime.properties to have the correct values for the following parameters:

  • db_server
  • db_url—A sample URL is jdbc:oracle:thin:@//Virtual IP: <port> /globalSID, where <port> is the port number, which defaults to 1521 .
  • db_driver
  • db_usr
  • db_pwd

Step 3blank.gif Prepopulate the database user name and password into the database
./pime.sh execjava.sh com.cisco.vpnsc.common.BootStrapHelper put repository <oracle username> <oracle password>

Step 4blank.gif If running, use the ./prime.sh stop command to stop Prime Provisioning.

Step 5blank.gif Verify that the value for the DCPL property watchdog/server/dbpoller/connectionextend is still set to the default: 5. See Appendix G, “DCPL Properties,” in the Cisco Prime Provisioning 7.2 User Guide.

Step 6blank.gif To update the database with the changes, enter:

./prime.sh startdb

./prime.sh initdb.sh

Step 7blank.gif Use ./prime.sh stop to stop the database.

Step 8blank.gif Then enter ./prime.sh start to start Prime Provisioning.


 

Backup of Oracle Database

See the Backup and Restore of Prime Provisioning Repository chapter in the Administration Guide.

Troubleshooting

This section lists Oracle database-related trouble shooting tips based on the following error messages:

  • ORA-01631: max # extents (4096) reached in table xyz

If you receive this message, it is typically an Oracle server storage configuration issue. This problem occurs when the tablespace for Prime Provisioning exceeds the limit set by the database configuration. To prevent this, plan proper storage before Prime Provisioning is set up. If this problem occurs, increase the initial or next extent, increase the growth percentage (such as, PCT_INCREASE), or reset the number of max extents (can be unlimited). The Prime Provisioning data must be exported and imported to the tablespace with the new tablespace parameters.

  • Unable to contact Rbac Manager

If you receive this message on Prime Provisioning and are unable to log in, this might be because Prime Provisioning cannot connect to the Oracle database. To avoid this situation, increase the number of Oracle server processes.

  • Cannot log into Inventory Manager or Topology Manager

If you cannot log into the Inventory Manager or Topology Manager, verify that the Oracle hostname is accessible from a client machine, either by DNS or a host file.

  • Resynchronize Prime Provisioning with new or updated Oracle ID and password

If the Oracle ID and password change after the Prime Provisioning installation, you must execute the following:

a.blank.gif execjava.sh com.cisco.vpnsc.common.BootStrapHelper put repository <oracle_id> <oracle_password>

b.blank.gif update etc/spe/cns.properties and modify these two properties:

DataAccess.principal.1 <oracle_id>

DataAccess.credentials.1 <oracle_password>

Upgrading and Database Migration

Cisco Prime Provisioning was supporting both Solaris and Linux platforms till 6.4.x release but this support has been removed from 6.5.x. Hence, if the customers using Prime Provisioning on Solaris server wants to upgrade to any release after 6.5.x has to migrate to Linux server.The listed below scenarios explains about the migration procedure:

Migrating Oracle Database from Solaris to Linux


Step 1blank.gif Stop the existing Prime Provisioning server using./prime.sh stop command in Solaris and Linux servers respectively.

Step 2blank.gif In Linux server, install the same version of Prime Provisioning as of Solaris.

Step 3blank.gif Update the below parameter values of the Linux server available in <PRIMEF_HOME>/runtime.properties file with the new values:

  • db_usr=<PP oracle user id>
  • db_pwd=<PP oracle password>
note.gif

Noteblank.gif In Linux server, you need to provide the same Oracle user id and password details as used in Solaris


Step 4blank.gif Execute the below commands from <PRIMEF_HOME>:

  • ./thirdparty/ant/bin/ant -f install.xml
  • ./prime.sh execjava.sh com.cisco.vpnsc.common.BootStrapHelper put repository <PP oracle user id> <PP oracle password>

Step 5blank.gif To start the database, use./prime.sh startdb command:

Step 6blank.gif To incorporate the changes into the Repository by initializing the database, use./prime.sh initdb.sh command.

Step 7blank.gif Restart the Prime Provisioning server using./prime.sh start command.

Migrating Sybase Database from Solaris to Linux


Step 1blank.gif Stop the existing Prime Provisioning server using./prime.sh stop command in Solaris and Linux servers respectively.

Step 2blank.gif In Linux server, install the same Prime Provisioning version as of Solaris with the embedded Sybase database.

For more information, refer to the section “Installing Prime Provisioning” section.

Step 3blank.gif Remove the repository directory that is available along with the installed version of Prime Provisioning in Linux server.

rm -rf <PRIMEF_HOME>/Repository

Step 4blank.gif Tar up the full Repository directory from Solaris and place it in <PRIMEF_HOME> directory.

Step 5blank.gif Copy the tar file from Solaris to <PRIMEF_HOME> directory of Linux server

Step 6blank.gif Untar this file in the same location.

Step 7blank.gif To start the database, use./prime.sh startdb command:

Step 8blank.gif To incorporate the changes into the Repository by initializing the database, use./prime.sh initdb.sh command.

Step 9blank.gif If you have the upgraded version of Prime Provisioning in Linux server then you need to update the repository using the upgrade script. For more information, refer to the section “Using the Repository Upgrade Tool” section.

Step 10blank.gif Restart the Prime Provisioning server using./prime.sh start command.