How do I export an NFM-P main database?

Purpose

Perform this procedure to export the main database content to a file set.

You require the following user privileges:

  • on each main server station — root

  • on the standalone or primary main database station:

    • root

    • Oracle database user — password initially set as the user-password value in the database section of samconfig

    • Oracle management user — user name specified during database installation; default is ‘oracle’

    • Oracle SYS user — default password available from technical support

CAUTION 

CAUTION

Service Disruption

A database export operation requires a shutdown of each main server, which causes a network management outage.

You must perform this procedure only during a scheduled maintenance period.

Note: The passwords that you enter in the procedure are not displayed.

Steps
General preparation
 

Clear all outstanding failed deployments. See “To view and manage failed deployments” in the NSP NFM-P User Guide for information about how to clear a failed deployment.


Obtain the following main database information; in a redundant deployment, you require the primary database information:

  • Oracle database instance name—default is samdb1

  • Oracle database user password—set initially as the user-password value in the database section of samconfig on the standalone or primary main server

  • Oracle SYS user password—default available from technical support


Stop main servers
 

Perform the following steps on each main server station to stop the main server.

Note: In a redundant deployment, you must stop the standby main server first.

  1. Log in to the main server station as the nsp user.

  2. Open a console window.

  3. Enter the following:

    bash$ cd /opt/nsp/nfmp/server/nms/bin ↵

  4. Enter the following to stop the main server:

    bash$ ./nmsserver.bash stop ↵

  5. Enter the following to display the main server status:

    bash$ ./nmsserver.bash appserver_status ↵

    The server status is displayed; the server is fully stopped if the status is the following:

    Application Server is stopped

    If the server is not fully stopped, wait five minutes and then repeat this step. Do not perform the next step until the server is fully stopped.


Run database export script
 

Log in to the main database station as the Oracle management user.


Open a console window.


If the directory that is to hold the database export file set does not exist, create the directory.

Note: The database export operation fails if the directory that is to contain the exported database file set does not exist.

The directory must be a directory on the local file system to which the Oracle management user has read/write access.


Enter the following:

bash$ /opt/nsp/nfmp/db/install/config/samdb/SAMDb_exportImport.sh -e destination

where destination is the absolute path of the directory that is to hold the database file set

Note: To display the script usage, specify the -h option, as follows:

SAMDb_exportImport.sh -h ↵

The following messages and prompt are displayed:

Using DB_INSTALL_BASE = /opt/nsp/nfmp/db/install

Using ORACLE_SID = maindb1

Using ORACLE_HOME = /opt/nsp/nfmp/oracle19

Enter the password for the "sys" user (terminal echo is off): 


Enter the Oracle SYS user password and press ↵.

The following prompt is displayed:

Enter the password for database_user (terminal echo is off):


Enter the Oracle database user password and press ↵.

The following prompt is displayed:

Enter the export encryption password (terminal echo is off):


10 

Create and record a database export encryption password. The password is required for a subsequent database import operation.

Note: The password can be of any length and use any characters.


11 

Type the created password and press ↵.

The following prompt is displayed:

Confirm export encryption password (terminal echo is off):


12 

Retype the password and press ↵.

The following message and prompt are displayed:

This tool will shutdown the db listener disconnecting any connections to the database.

Have the SAM servers been shutdown? [y/n/q] (y): 


13 

Press ↵.

The following message and prompt are displayed:

To optimize the speed of the export this script will use as many CPUs as you allow it to.

The maximum number of CPUs available are n

How many CPUs will be used for this export? (1):


14 

Type the number of CPUs to use for the export operation, and press ↵.

The following prompt is displayed:

Do you want to perform an export size estimate first? [y/n/q] (y):


15 

Press ↵ to direct the script to estimate the amount of disk space that the export requires.

The script displays an estimate of the required disk space, the available space in the partition that contains the destination directory, and the following prompt:

Do you have enough space? [y/n/q] (n):


16 

Perform one of the following.

  1. Confirm the space requirement and proceed with the export.

    1. Type y ↵ if the partition has sufficient capacity to hold the exported file set.

      The following prompt is displayed:

      Proceed with the export? [y/n/q] (y):

    2. Press ↵. The database export begins.

      The script displays information that includes the export log filename and a series of progress indicators.

  2. Press ↵ if the partition lacks sufficient capacity to hold the exported file set.

    The following message is displayed and the script exits:

    Cancelling export... 


17 

Close the open console windows, as required.

End of steps