How do I import an NFM-P main database?

Purpose

Perform this procedure to import a main database from an exported 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 import 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
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.


Install database
 

You can perform a main database import only on a station that has a newly installed main database; perform one of the following.

  1. If the station on which you are performing the import hosts a main database that is not newly installed, uninstall the database, as described in the NSP Installation and Upgrade Guide.

  2. If the station on which you are performing the import has no main database installed, install a main database on the station, as described in the NSP Installation and Upgrade Guide.


Run database import script
 

Copy the exported database file set to the database station.

Note: The directory to which you copy the file set must contain no other files.

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


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


Open a console window.


Enter the following:

bash$ /opt/nsp/nfmp/db/install/config/samdb/SAMDb_exportImport.sh -i source ↵

where source is the absolute path of the directory that contains the exported 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):


Enter the database export encryption password created during the database export operation.

The following messages and prompt are displayed:

In order to optimize the speed of this import, this script needs to know how many CPUs are available on this machine and how many data files there are to import.

This machine appears to have n CPUs

Is this correct? [y/n/q] (y):


10 

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

The following message and prompt are displayed:

There appears to be n data files to import   Is this correct? [y/n/q] (y):


11 

Press ↵ if the number of data files to import is correct.

The following message and prompt are displayed:

Log of import command will be written to log_file

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


12 

Press ↵ to proceed with the database import.

The script generates messages like the following as it begins to import the database.

Adding addition datafiles to existing tablespacesRestore wallet file

Restarting the database...

Shutting down the listener

Starting import: timestamp

where timestamp is the start time of the import operation

The script displays a series of progress indicators.

The following messages are displayed when the import operation is complete:

Executing recreate TI_BULK* packages body

Import done: timestamp

Starting up the listener

Here is the import log: log_file

where

log_file is the name of a log file that the script creates

timestamp is the start time of the import operation


13 

Close the open console windows, as required.

End of steps