import

Upload to MySQL Database

Imports data from NPAC files into LSMS databases. This command performs all parameter checking, and validates or creates the NPAC directory if required.

Note: Do not run the import command while any of the following processes are also running: backups, starting a standby node (to change its state from UNINITIALIZED "INHIBITED" to STANDBY), running the lsmsdb quickaudit command, and creating query server snapshots, all of which use temporary storage space. If you try to run the import command while any of these processes are running, you may not have enough disk space to complete the process. Since backups can be run automatically, perform the procedure described in “Checking for Running Backups” to ensure that no backups are running.

Keyword

import

Permission

The user must be defined as a member of the primary group lsms.

Syntax

$LSMS_DIR/import [-c] [-o [-d <dir>]] <region> [<filename>...]

Provided the import command is prefaced by the $LSMS_DIR environment variable, it can be performed from any directory location.

Options

-c
If an error occurs, continue with the next record in the file. Errors are recorded in a file named <filename>_FAILED, where <filename> has the same value as was entered in the command.
-o
Generate a Response file for SV and NPB imports.
-d <dir>
Put the Response file(s) in the specified directory (defaults to the same directory as each SV/NPB import file).

Parameters

<region>
Name of the NPAC region: Midwest, MidAtlantic, Northeast, Southeast, Southwest, Western, WestCoast, Canada. This is a required parameter.
<filename>
The name of the NPAC downloadfile in npacftp/<region>. This is an optional parameter. If you do not specify a <filename>, a list displays that includes all the valid import files from the npacftp/<region> directory for the NPAC region specified (the region is a required parameter).
Note: Filenames must adhere to the following formats:
LRN.<create>.<start>.<end> NPANXX.<create>.<start>.<end> NPANXXX.<create>.<start>.<end> SPID.<create>                        <npanxx>-<npanxx>.<create>.<start>.<end>                        <npanxxx>-<npanxxx>.<create>.<start>.<end>
Where:

<create> is the file creation timestamp: <DD-MM-YYYYhhmmss>

<start> is the start of the time-range: <DD-MM-YYYYhhmmss>

<end> is the end of the time-range: <DD-MM-YYYYhhmmss>

Note: For Active (not time-range) files,
<start> is 00-00-0000000000 and             <end> is 99-99-9999999999
Note: SPID files are always Active.
Note: Active files with filenames in the old format, with only a creation timestamp, are still supported.

Example 1:

<npanxx>-<npanxx>.<create>.<start>.<end>:
               
303123-303125.02-11-1998133022.12-10-1998080000.13-10-1998133022

Example 2:

LRN.<create>.<start>.<end> [Active (not time-range) file]:
LRN.02-10-2001102201.00-00-0000000000.99-99-9999999999

Sample Output

NPAC FTP directory: /var/TKLC/lsms/free/data/npacftp/Midwest
The following NPAC download file(s) are available for import:
            LRN.11-07-2001145342           NPANXX.11-07-2001145342
        NPANXXX.11-07-2001145342             SPID.11-07-2001145342
  000000-999999.11-07-2001145342     0000000-9999999.11-07-2001145342
Import LRN.11-07-2001145342 (Yes/No/All/Quit)?all
The following NPAC download files have been chosen to be imported:
           SPID.11-07-2001145342          NPANXXX.11-07-2001145342
         NPANXX.11-07-2001145342              LRN.11-07-2001145342
  000000-999999.11-07-2001145342  0000000-9999999.11-07-2001145342
Do you want to continue (Yes/No)?yes
Beginning Delete Process for SPID.11-07-2001145342
Delete Process Completed for SPID.11-07-2001145342
Beginning Download Process for SPID.11-07-2001145342
1000 ServiceProvNetwork instance updates in MidwestDB
2000 ServiceProvNetwork instance updates in MidwestDB
2351 ServiceProvNetwork instance updates in MidwestDB
Import completed successfully.
Download Process Completed for SPID.11-07-2001145342
Beginning Delete Process for NPANXXX.11-07-2001145342
Delete Process Completed for NPANXXX.11-07-2001145342
Beginning Download Process for NPANXXX.11-07-2001145342
1000 ServiceProvNPA_NXX_X instance updates in MidwestDB
2000 ServiceProvNPA_NXX_X instance updates in MidwestDB
3000 ServiceProvNPA_NXX_X instance updates in MidwestDB
4000 ServiceProvNPA_NXX_X instance updates in MidwestDB
30000 ServiceProvNPA_NXX_X instance updates in MidwestDB
30860 ServiceProvNPA_NXX_X instance updates in MidwestDB
Import completed successfully.
Download Process Completed for NPANXXX.11-07-2001145342
Beginning Delete Process for NPANXX.11-07-2001145342
Delete Process Completed for NPANXX.11-07-2001145342
Beginning Download Process for NPANXX.11-07-2001145342
90 ServiceProvNPA_NXX instance updates in MidwestDB
1090 ServiceProvNPA_NXX instance updates in MidwestDB
Import completed successfully.
Download Process Completed for NPANXX.11-07-2001145342
Beginning Delete Process for LRN.11-07-2001145342
Delete Process Completed for LRN.11-07-2001145342
Beginning Download Process for LRN.11-07-2001145342
1000 ServiceProvLRN instance updates in MidwestDB
2000 ServiceProvLRN instance updates in MidwestDB
3000 ServiceProvLRN instance updates in MidwestDB
4000 ServiceProvLRN instance updates in MidwestDB
4700 ServiceProvLRN instance updates in MidwestDB
5700 ServiceProvLRN instance updates in MidwestDB
Import completed successfully.
Download Process Completed for LRN.11-07-2001145342
Beginning Delete Process for 000000-999999.11-07-2001145342
All Subscription Version instances deleted from Midwest
Delete Process Completed for 000000-999999.11-07-2001145342
Beginning Download Process for 000000-999999.11-07-2001145342
1000 SubscriptionVersion instance updates in MidwestDB
2000 SubscriptionVersion instance updates in MidwestDB
3000 SubscriptionVersion instance updates in MidwestDB
4000 SubscriptionVersion instance updates in MidwestDB
4500 SubscriptionVersion instance updates in MidwestDB
Import completed successfully.
Download Process Completed for 000000-999999.11-07-2001145342
Beginning Delete Process for 0000000-9999999.11-07-2001145342
All Subscription Version instances deleted from Midwest
Delete Process Completed for 0000000-9999999.11-07-2001145342
Beginning Download Process for 0000000-9999999.11-07-2001145342
1000 NumberPoolBlock instance updates in MidwestDB
2000 NumberPoolBlock instance updates in MidwestDB
Import completed successfully.
Download Process Completed for 0000000-9999999.11-07-2001145342
Script completed.

Files

Table A-11 shows the files for the import command.

Files: import

Filename

Type

Location

<filename>

Download file

/var/TKLC/lsms/free/data/npacftp/<region>

<filename>_FAILED

Error file, created if errors occur during import. If the -c option was not specified, the file will contain at most one entry.

/var/TKLC/lsms/free/data/npacftp/<region>

<filename>-<spid>

Response file

/var/TKLC/lsms/free/data/npacftp/<region>

Error Messages

Error Messages: import

Exit Code

Message

Cause

Suggested Recovery

7

  • Delete process failed for BulkLoadFile : retCode

  • Delete process failed for BulkLoadFile : delete coredump from signal SigValue

Delete utility failed

Contact the My Oracle Support (MOS).

8

  • Download process failed for BulkLoadFile : retCode

  • Download process failed for BulkLoadFile : dnld coredump from signal SigValue

DNLD utility failed

Contact the My Oracle Support (MOS).

99

Insufficient arguments Usage: import <region> [<filename>...] where <region> is the name of the NPAC  region database: Canada, Midwest, MidAtlantic, Northeast, Southeast, Southwest, Western, WestCoast <filename> name of the NPAC  download file: SPID .dd-mm-yyyyhhmmss LRN .dd-mm-yyyyhhmmss NPANXX .dd-mm-yyyyhhmmss npanxx-npanxx.dd-mm-yyyyhhmmss

Invalid number of parameters supplied

Try the command again with correct syntax.

1

Invalid NPAC Region. Usage: import <region> [<filename>...] where <region> is the name of the NPAC region:       database: Canada, Midwest, MidAtlantic, Northeast, Southeast, Southwest, Western, WestCoast <filename> name of the NPAC download file:       SPID.dd-mm-yyyyhhmmss      LRN.dd-mm-yyyyhhmmss      NPANXX.dd-mm-yyyyhhmmss      npanxx-npanxx.dd-mm-yyyyhhmmss

Invalid NPAC region supplied

Supply valid region name for command.

2

LSMS_DIR environment variable is not set/defined.

LSMS_DIR environment variable is not set

Verify the environment variables or contact the My Oracle Support (MOS).

9

/var/TKLC/lsms/free/data/npacftp/ <region> does not contain any download files.

NPAC directory for <region> does not contain any download files

No action necessary.

3

/var/TKLC/lsms/free/data/npacftp/ <region> NPAC directory does not exist.

NPAC FTP directory for <region> cannot be located

Contact the My Oracle Support (MOS).

5

The npacagent process is currently running for the <region> region. It must be stopped prior to importing by executing the following command:

$LSMS_DIR/lsms stop <region>

The npacagent process is running for specified region

Stop the npacagent process for this region and try the command again.