C Downloading Files from an NPAC to the LSMS

This chapter describes how you can manually FTP bulk data download (BDD) files from the NPAC to the LSMS and merge those data files into an LSMS regional database.

Overview

This chapter describes how you can manually FTP bulk data download (BDD) files from the NPAC to the LSMS and merge those data files into an LSMS regional database.

Following are some examples of situations in which you would use the BDD procedure described in this chapter (see NPAC-LSMS Download Procedure):

  • To perform a download of NPAC data after an LSMS site failure (for more information about restoring an LSMS site, see Recovering from Site Failures)
  • To perform a download of NPAC data when migrating an LSMS
  • To update NPA split information as part of a procedure to correct an active NPA Split Entry made in error (for more information about this procedure, refer to “Reversing (Correcting) an NPA Split Entry Made in Error” in the Database Administrator's Guide)

Time Range BDD and Object BDD/Object Range BDD

Note:

Object ranges are used so that potentially very large files can be broken down into smaller files based on NPA-NXX (for SVs) or NPA-NXX-X (for NPBs) ranges. Because of the much smaller number of LRN, NPA-NXX, NPA-NXX-X, or SPID objects, ranges are not supported for these data file types.

If you have installed the optional feature, NANC 3.2 Mass Update of SPID and BDD Enhancements, you can download files either for objects/object ranges or for time ranges (however, time range files are not supported for SPIDs).

Whenever you need to perform a download after a site failure or when migrating an LSMS, determine if it necessary to perform an Object BDD/Object Range BDD, or whether a Time Range BDD would suffice; a Time Range BDD can take many hours less to complete than an Object BDD/Object Range BDD.

Primarily, a Time Range BDD differs from an Object BDD/Object Range BDD in that:

  • Each entry in the Time Range BDD file is processed as a create, modify, or delete in the LSMS databases; no data is deleted from the LSMS database prior to the import. Each entry in the Object BDD/Object Range BDD file is processed only as a create in the LSMS databases; all data in the LSMS database that meets the range criteria is deleted prior to the import.
  • A Time Range BDD enables you to download a file from an NPAC that contains porting data for a specific period of time (you can specify begin and end timestamp values); an Object Range BDD does not allow you to specify begin and end timestamp values (the default values, 00-00-0000000000 and 99-99-9999999999, are assumed).

    Note:

    Time Range SPIDBDD files are not supported.

A Time Range BDD is not appropriate for correcting NPA Split information or EDR Conversion data.

NPAC-LSMS Download Procedure Summary

The following procedure is an outline of the detailed procedure shown in NPAC-LSMS Download Procedure”.

Caution:

The following procedure requires the connection between the LSMS and each regional NPAC that needs to have files downloaded be aborted (when you stop the regional agent in 27) before the NPAC builds the files to be sent to the LSMS. The connection must be aborted so that data can be properly resynchronized after the download of files completes. Therefore, the normal transmission of NPAC data from the LSMS to the connected NEs will temporarily be precluded during this procedure. It is recommended that you contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 before performing this procedure.

Note:

If an automatic or manual switchover occurs while files are being downloaded from the NPAC or between the time files are downloaded from the NPAC and the time they are imported into the LSMS database, perform the appropriate procedure described in “Copying Files to Other Server If Switchover Occurs”.

Note:

Before you start this procedure, it is recommended that you contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66. If you encounter any problems in the procedure, you must call the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66.
  1. Request the appropriate file from the NPAC for a given SPID and region.
  2. Use FTP to download that file when the NPAC indicates the file is available.
  3. Move to another folder all the files currently residing in the NPAC import folder (/var/TKLC/lsms/free/data/npacftp/<region>, where <region> is the region that you are importing).
  4. Untar the BDD file (Object BDD/Object Range BDD file or Time Range BDD file) in this <region> folder using the following command:
    tar –zxvf filename.tar.gz
  5. Run /usr/TKLC/lsms/bin/import <region> for the appropriate region.
  6. Answer the questions presented by the import script.

Prerequisite Information

Before starting this procedure, obtain the following site-specific information. Record this information on your recovery preparation worksheet (see Recovery Preparation Worksheet).

  • A login name and password for each supported NPAC. This login and password have been previously issued by the regional NPAC.

  • The FTP IP address of each supported NPAC.

  • The FTP directory names where the files are located on each supported NPAC.

  • Data file names you need to download. To determine the naming convention for each type of NPAC data file, see “File Naming Conventions”.

  • Contact the NPAC of the region for which data files are required and request that the files you need be copied into the NPAC’s FTP directory.

File Naming Conventions

All BDD file names include a creation timestamp, which is represented as <create>. Time Range BDD file names also contain start (<start>) and end (<end>) timestamps. All timestamps are represented as DD-MM-YYYYhhmmss where:

DD represents a two-digit day

MM represents a two-digit month

YYYY represents a four-digit year

hh represents a two-digit hour

mm represents a two-digit minute

ss represents a two-digit second

An example timestamp is 11-10-2006123015.

For Object Range BDD files, <start> is always 00-00-0000000000 and <end> is always 99-99-9999999999. These are the default values.

Table C-1 references the pages where you can find information about file naming conventions for each data type:

Table C-1 Determining Naming Conventions for NPAC Data Files

Type of Data File See:

Subscription Version (Object Ranges and Time Ranges are supported)

Table C-2

Number Pool Block (Object Ranges and Time Ranges are supported)

Table C-3

LRN, NPA-NXX, and NPA-NXXX (Only Objects are supported)

Table C-4

SPID (Only Objects are supported)

Table C-5

Note:

Object ranges are used so that potentially very large files can be broken down into smaller files based on NPA-NXX (for SVs) or NPA-NXX-X (for NPBs) ranges. Because of the much smaller number of LRN, NPA-NXX, NPA-NXX-X, or SPID objects, ranges are not supported for these data file types.

Subscription Version File Naming Convention

The file name for subscription version files is represented as <NPANXX-NPANXX>, which indicates the range of NPA-NXX values contained in the download file. The file extension values depend on whether you are requesting a file for an Object Range BDD or for a Time Range BDD, as shown in Table C-2.

Table C-2 NPAC File Naming Convention for Subscription Version Data File

Range Type Naming Convention

Object Range BDD

<NPANXX-NPANXX>.<create>2.00-00-0000000000.99-99-9999999999

Time Range1 BDD

<NPANXX-NPANXX>.<create>.<start>.<end>2

1Time Range files are supported only if you have installed the NANC 3.2 feature

2For format of <create>, <start>, and <end>, see File Naming Conventions.

Following are examples of uses for subscription version BDD files:

  • If you need to bulk download all subscription versions from the NPAC, use the following file name:

    
    <000000-999999>.<create>.00-00-0000000000.99-99-9999999999
    
  • If you need to bulk download all subscription versions for a time period from midnight February 12, 2006 to midnight February 13, 2006 in a file created February 14, 2006 at 9:00 a.m., use the following file name:

    
    <000000-999999>.14022006090000.12022006000000.13022006000000
    
  • If you need files to correct an NPA split, specify three Object Range files that have the same NPANXX values before and after the hyphen:

    • One file with the old NPANXX value

    • One file with the correct new NPANXX value

    • One file with the erroneous new NPANXX value

    For example, if an NPA split was erroneously entered from 909-860 to 123-860 instead of correctly from 909-860 to 124-860, specify the following files:

    • 909860-909860

    • 124860-124860

    • 123860-123860

    Because no file extension is specified in these files, the default values of 00-00-0000000000.99-99-9999999999 are assumed.

Number Pool Block File Naming Convention

The file name for number pool block files is represented as <NPANXXX-NPANXXX>, which indicates the range of EDR NPA-NXXX values contained in the download file. The file extension values depend on whether you are requesting a file for an Object Range BDD or for a Time Range BDD, as shown in Table C-3.

Table C-3 NPAC File Naming Convention for Number Pool Block Data File

Range Type Naming Convention

Object Range BDD

<NPANXXX-NPANXXX>.<create>2.00-00-0000000000.99-99-9999999999

Time Range1 BDD

<NPANXXX-NPANXXX>.<create>.<start>.<end>2

1Time Range files are supported only if you have installed the NANC 3.2 feature

2For format of <create>, <start>, and <end>, see File Naming Conventions.

These file types exist only if the NPAC supports Efficient Data Representation (EDR). Following are examples of uses for number pool block BDD files:

  • If you need to bulk download all number pool blocks from the NPAC, use the following file name:

    
    <0000000-9999999>.<create>.00-00-0000000000.99-99-9999999999
    
  • If you need to bulk download all number pool blocks for a time period from midnight February 12, 2006 to midnight February 13, 2006 in a file created February 14, 2006 at 9:00 a.m., use the following file name:

    
    <0000000-9999999>.14022006090000.12022006000000.13022006000000
    
  • If you need files to correct an NPA split, specify three files, each with the NPANXX value followed by a 0 before the hyphen and the NPANXX value followed by a 9 after the hyphen:

    • One file with the old NPANXX value

    • One file with the correct new NPANXX value

    • One file with the erroneous new NPANXX value

      For example, if an NPA split was erroneously entered from 909-860 to 123-860 instead of correctly from 909-860 to 124-860, specify the following files:

    • 9098600-9098609

    • 1248600-1248609

    • 1238600-1238609

Because no file extension is specified in these files, the default values of 00-00-0000000000.99-99-9999999999 are assumed.

LRN, NPA-NXX, and NPA-NXXX File Naming Convention

Note:

In contrast to SVs and NPBs data file types, there are a much smaller number of LRN, NPA-NXX, and NPA-NXX-X objects; therefore, ranges are not supported for these data file types, as shown in Table C-4.

  • The file name for LRN files is represented as <LRN>, which indicates the LRN value contained in the download file.

  • The file name for NPA-NXX files is represented as <NPANXX>,which indicates the NPA-NXX value contained in the download file.

  • The file name for NPA-NXXX files is represented as <NPANXX>, , which indicates the EDR NPA-NXXX value contained in the download file. This file type exists only if the NPAC supports Efficient Data Representation (EDR).

The file extension values depend on whether you are requesting a file for an Object BDD or for a Time Range BDD, as shown in Table C-4.

Table C-4 NPAC File Naming Convention for LRN, NPA-NXX, and NPA-NXXX Network Data Files

Type Naming Convention

Object BDD

<LRN>.<create>2.00-00-0000000000.99-99-9999999999

<NPANXX>.<create>2.00-00-0000000000.99-99-9999999999

<NPANXX>.<create>2.00-00-0000000000.99-99-9999999999

Time Range1BDD

<LRN>.<create>.<start>.<end>2

<NPANXX>.<create>.<start>.<end>2

<NPANXXX>.<create>.<start>.<end>2

1 Time Range files are supported only if you have installed the NANC3.2 feature

2 For format of <create>, <start>, and <end>, see File Naming Conventions.

SPID File Naming Convention

Note:

In contrast to SVs and NPBs data file types, there is a much smaller number of SPID objects; therefore, ranges are not supported for this data file type, as shown in Table C-5.

The SPID naming convention only applies to Object BDD files; Time Range is not supported. The file name for SPID files is represented as <SPID>, which indicates the SPID value contained in the download file..

Table C-5 NPAC File Naming Convention for SPID Network Data File

Type Naming Convention

Object BDD

<SPID>.<create>2.00-00-0000000000.99-99-9999999999

2 For format of <create>, <start>, and <end>, see File Naming Conventions.

Only the <create> timestamp field is supported.

Because no file extension is specified in these files, the default values of 00-00-0000000000.99-99-9999999999 are assumed.

NPAC-LSMS Download Procedure

Use the following procedure to perform a download of files from an NPAC to the LSMS. The example output shown in the procedure is for Time Range BDD files that include Number Pooling Efficient Data Representation (EDR). File formats for other download types vary, as described in File Naming Conventions. For more information about EDR, refer to the Database Administrator's Guide.

Note:

Before you start this procedure, it is recommended that you contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66. If you encounter any problems in the procedure, you must call the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66.

Caution:

The following procedure requires the connection between the LSMS and each regional NPAC that needs to have files downloaded be aborted (when you stop the regional agent in step 26) before the NPAC builds the files to be sent to the LSMS. The connection must be aborted so that data can be properly resynchronized after the download of files completes. Therefore, the normal transmission of NPAC data from the LSMS to the connected NEs will temporarily be precluded during this procedure. It is recommended that you contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 before performing this procedure.

Note:

If an automatic or manual switchover occurs while files are being downloaded from the NPAC or between the time files are downloaded from the NPAC and the time they are imported into the LSMS database, perform the appropriate procedure described in “Copying Files to Other Server If Switchover Occurs”.
  1. Ensure that you have the necessary information, as described in “Prerequisite Information”.
  2. Log in to the LSMS active server as lsmsadm.
  3. Change to the directory that contains the current LSMS version:
    $ cd /var/TKLC/lsms/free/data/npacftp/<region>
  4. Verify that the correct directory was accessed by entering the following command:
    $ pwd

    The correct output is:

    
    /var/TKLC/lsms/free/data/npacftp/<region>
    
  5. Determine whether any files are currently contained in this directory:
    $ ls -l
  6. If the output shows any files, delete them by entering the following command:
    $ rm *

    Note:

    Though the steps in this procedure refer to the use of FTP, you may use SFTP instead.
  7. Use FTP to connect to the NPAC by entering the following command, where <NPAC_IP_address> is the decimal version of the NPAC’s IP address, recorded on your worksheet, as described in “Prerequisite Information”:
    $ ftp <NPAC_IP_address>

    An example command line follows:

    $ ftp 208.143.38.10
  8. When prompted, enter your NPAC login name and password, recorded on your worksheet, as described in “Prerequisite Information”.
  9. Change to the NPAC’s FTP directory by entering the following command, where <NPAC_FTP_directory> is the regional directory as recorded on the your worksheet that corresponds to the region selected in 3:
    ftp> cd <NPAC_FTP_directory>
  10. Display the contents of the NPAC’s FTP directory by entering the following command:
    ftp> ls
    • Output similar to the following appears.
      
      200 PORT command successful.
      150 Opening ASCII mode data connection for file list.
      000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      0000000-9999990.07-11-2004023849.07-10-2004023849.07-11-2004023849
      LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
      NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      SPID.07-11-2000023849
      226 Transfer complete.
      70 bytes received in 0.026 seconds (2.6 Kbytes/s)
      
    • If you are converting a regional database to support EDR, output similar to the following appears:
      
      200 PORT command successful.
      150 Opening ASCII mode data connection for file list.
      0000000-9999990.07-11-2004023849.07-10-2004023849.07-11-2004023849
      NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      226 Transfer complete.
      20 bytes received in 0.026 seconds (2.6 Kbytes/s)
      
  11. Change to noninteractive mode by entering the following command:
    ftp> prompt

    Output similar to the following appears:

    
    Interactive mode off
    
  12. Transfer the files you need as follows:
    • If you are downloading files from the NPAC after a site failure, enter the following command to transfer all the files in the NPAC’s FTP directory <NPAC_FTP_directory> to the LSMS’s regional directory /var/TKLC/lsms/free/data/npacftp/<region>:

      ftp> mget *

    • If you are reversing an NPA split, enter commands similar to the following commands (these commands use the values from the example) to transfer the subscription files and NPB files for the old NPANXX and the erroneous new NPANXX from the NPAC’s FTP directory <NPAC_FTP_directory> to the LSMS’s regional directory /var/TKLC/lsms/free/data/npacftp/<region>:

      ftp> mget 909860*

      ftp> mget 123860*

      ftp> mget 124860*

    • If you are converting a regional database to support EDR, enter the following commands to transfer the EDR files from the NPAC’s FTP directory <NPAC_FTP_directory> to the LSMS’s regional directory /var/TKLC/lsms/free/data/npacftp/<region>:

      ftp> mget 0000000-9999999*

      ftp> mget NPANXXX*

  13. Output similar to the following appears (the example shows only Time Range BDD files for downloading):
    
    200 PORT command successful.
    150 Opening BINARY mode data connection for 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849 (17979 bytes).
    ###
    226 Transfer complete.
    local: 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849 
    remote: 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    17979 bytes received in 0.18 seconds (le+02 Kbytes/s)
    200 PORT command successful.
    150 Opening BINARY mode data connection for 
    0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849 
    (17979 bytes).
    ###
    226 Transfer complete.
    local: 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849 
    remote: 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    17979 bytes received in 0.18 seconds (le+02 Kbytes/s)
    200 PORT command successful.
    150 Opening BINARY mode data connection for LRN.07-10-2000023849 
    (17979 bytes).
    ###
    226 Transfer complete.
    local: LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849 
    remote: LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
    17979 bytes received in 0.18 seconds (le+02 Kbytes/s)
    200 PORT command successful.
    150 Opening BINARY mode data connection for NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 (124831 bytes).
    ################
    226 Transfer complete.
    local: NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 
    remote: NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    124831 bytes received in 1 seconds (1.2e+02 Kbytes/s)
    200 PORT command successful.
    150 Opening BINARY mode data connection for NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 (124831 bytes).
    ################
    226 Transfer complete.
    local: NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 
    remote: NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    124831 bytes received in 1 seconds (1.2e+02 Kbytes/s)
    200 PORT command successful.
    150 Opening BINARY mode data connection for SPID.07-10-2004023849 (479 bytes).
    #
    226 Transfer complete.
    local: SPID.07-10-2004023849 remote: 07-10-2004023849
    479 bytes received in 0.018 seconds (27 Kbytes/s)
    
  14. Exit FTP by entering the following command:
    ftp> quit
  15. Ensure that the files just downloaded have appropriate permissions for all users by entering the following command:
    $ chmod 655 *
  16. Enter the following command to verify that all the files in 12 transferred and that they now have read-write permission:
    $ ls -l

    Output similar to the following appears (the example shows only Time Range BDD files for downloading):

    
    total 3188358
    -rw-r-r-  1 lsmsadm  lsms 1608000001 Jul  11 02:38 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    -rw-r-r-  1 lsmsadm  lsms 1608000001 Jul  11 02:38 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    -rw-r-r-  1 lsmsadm  lsms 780001     Jul  11 02:38 LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
    -rw-r-r-  1 lsmsadm  lsms 6440001    Jul  11 02:38 NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    -rw-r-r-  1 lsmsadm  lsms 6440001    Jul  11 02:38 NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    -rw-r-r-  1 lsmsadm  lsms 239990     Jul  11 02:38 SPID.07-10-2000023849
    

    Note:

    It is recommended that you create a backup of your files before proceeding to the next step. To create a backup, enter the following command:

    $ mkdir /var/TKLC/lsms/free/data/npacftp/<region>/save

  17. If you need files from another NPAC region, repeat 3 through 16.
  18. If switchover has occurred, perform the appropriate procedure described in “Copying Files to Other Server If Switchover Occurs”.
  19. Untar the BDD file (Object Range BDD file or Time Range BDD file) in the <region> folder using the following command:
    tar –zxvf filename.tar.gz
  20. Enter the following command to display the number of lines in each bulk load file.
    $ wc -l *

    Note:

    Record the line count values (shown in bold below) for future reference.
    
        1892 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
          0 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
        892 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
          0 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
        250 LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
          0 LRN.07-10-2004023849.07-11-2004023849
         23 NPANXX.07-10-2004023849.07-11-2004023849
          0 NPANXX.07-10-2004023849.07-11-2004023849
         12 NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
          0 NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
          0 SPID.07-10-2004023849    
  21. BDD files received from the NPAC require conversion before they can be imported into the LSMS database.
    The conversion must be performed by entering the following command for each file:

    $ cat orig_file_from_NPAC | tr "\015" "\012" > new_file_for_import

    (The file name must be changed. Oracle recommends that you append a few characters, such as .tr, to the end of the file name. Maintaining most of the file name will make it easier to rename the files to the original file names, as instructed in 23) For example:
    
    $ cat 000000-999999.07-10-2000023849 | tr "\015" "\012" > 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr
    $ cat 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849 | tr "\015" "\012" > 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr
    $ cat LRN.07-10-2000023849 | tr "\015" "\012" > LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr
    $ cat NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 | tr "\015" "\012" > NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr
    $ cat NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 | tr "\015" "\012" > NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr
    $ cat SPID.07-10-2004023849 | tr "\015" "\012" > 
    SPID.07-10-2004023849.tr
    
  22. After ensuring all files have been converted, delete the original files.
    $ rm orig_file_from_NPAC

    For example:

    
    $ rm 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ rm 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ rm LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ rm NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ rm NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ rm SPID.07-10-2004023849
    
  23. Rename each of the files that were converted in 21 back to the original NPAC file names by entering the following command for each file:
    $ mv new_file_for_import orig_filename_from_NPAC

    For example:

    
    $ mv 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr
     000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ mv 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ mv LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ mv NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ mv NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849.tr NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
    $ mv SPID.07-10-2004023849.tr SPID.07-10-2004023849
    
  24. Verify that the files were properly converted by entering the following command:
    $ file *
    Properly converted files will be appended with the following information, : ASCII text, as shown in the example output below.
    
    000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    LRN.07-10-2004023849.07-11-2004023849: ASCII text
    NPANXX.07-10-2004023849.07-11-2004023849: ASCII text
    NPANXX.07-10-2004023849.07-11-2004023849: ASCII text
    NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849: ASCII text
    SPID.07-10-2004023800: ASCII text
    SPID.07-10-2004023849: ASCII text

    Note:

    If the files are appended with : ASCII text, with CR line terminators, then the conversion performed in 21 failed. Contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66.
  25. If switchover has occurred, perform the appropriate procedure described in “Copying Files to Other Server If Switchover Occurs”.
  26. If the SWIM feature has been enabled, contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 to turn off SWIM.
  27. Perform the following substeps to prevent the NPAC database from being updated while the files are being converted and copied in subsequent steps:
    1. Halt the LSMS agent for the region:
      $ $LSMS_DIR/lsms stop <region>
    2. From the LSMS GUI menu, select Configure>LNP System>NPAC>Modify>Primary and click the Activate Region checkbox so that is empty.
      For more information about this GUI window, refer to the Configuration Guide. Having this checkbox empty prevents the sentryd utility from attempting to automatically restart the regional agent.
  28. You are now ready to run the import command.

    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.
    • If you are performing this procedure as part of reversing an NPA split, converting a regional database to support EDR, importing an incremental download of files from NPAC after a site failure, or importing files for any reason other than a complete regional bulk download, go to 29.
    • If you are performing a complete regional bulk download from the NPAC, you can save a significant amount of time (which would be required to delete all existing entries in the database) by entering the following commands, where <region> is the name of the NPAC region:

      Caution:

      The following commands will delete all data in your regional database.

      Log into the active server and run both of the following commands:

      $ $LSMS_DIR/npac_db_setup remove <region>

      $ $LSMS_DIR/npac_db_setup_create <region>

  29. Import data in the downloaded files into the regional database by entering the following command:
    $ $LSMS_DIR/import [-c] <region>

    For example:

    $ $LSMS_DIR/import -c MidAtlantic

    The -c option allows the import to continue on to the next line of the file even if errors occur. Output similar to the following indicates the progress of the LSMS processing:

    Note:

    In these examples, … on a line by itself indicates that output occurs, but its contents are not significant to this procedure.

    Note:

    If you do not specify the -c option and a failure, such as a syntax error, occurs during the import process, an error message is displayed and the import utility prompts the user with the following message: Do you want to continue (Yes/No)? If n is entered, the import utility operation is aborted. If y is entered, the import utility aborts its operation for the current download file and continues importing the remaining specified download files.

    If such an error occurs, be sure to perform the substeps shown in 30.

    • Output similar to the following appears as the LSMS deletes subscription versions, NPBs, LRNs, NPANXXs, and SPIDs in the regional LSMS database, reformats the NPAC data file, and places the data from the NPAC data file into the specified regional LSMS database.
      
      NPAC FTP directory: /var/TKLC/lsms/free/data/npacftp/Midwest
      The following NPAC download file(s) are available for import:
                  LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
                 NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
              NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849             
      SPID.07-10-2004023849
        000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849     
      0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      Import LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849 (Yes/No/All/Quit)?all
      The following NPAC download files have been chosen to be imported:
                 SPID.07-10-2004023849          
      NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849 
             NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849              
      LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
        000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849  
      0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      Do you want to continue (Yes/No)?yes
      Beginning Delete Process for SPID.07-10-2004023849
      Delete Process Completed for SPID.07-10-2004023849
      Beginning Download Process for SPID.07-10-2004023849
      1000 ServiceProvNetwork instances written to MidwestDB
      2000 ServiceProvNetwork instances written to MidwestDB
      2351 ServiceProvNetwork instances written to MidwestDB
      
      Import completed successfully.
      Download Process Completed for SPID.11-07-2001145342
      
      Beginning Delete Process for NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      Delete Process Completed for NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Download Process for NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      1000 ServiceProvNPA_NXX_X instances written to MidwestDB
      2000 ServiceProvNPA_NXX_X instances written to MidwestDB
      3000 ServiceProvNPA_NXX_X instances written to MidwestDB
      4000 ServiceProvNPA_NXX_X instances written to MidwestDB
      …
      30000 ServiceProvNPA_NXX_X instances written to MidwestDB
      30860 ServiceProvNPA_NXX_X instances written to MidwestDB
      Import completed successfully.
      Download Process Completed for NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Delete Process for NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Delete Process Completed for NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Download Process for NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      90 ServiceProvNPA_NXX instances written to MidwestDB
      1090 ServiceProvNPA_NXX instances written to MidwestDB
      Import completed successfully.
      Download Process Completed for NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Delete Process for LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Delete Process Completed for LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Download Process for LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      1000 ServiceProvLRN instances written to MidwestDB
      2000 ServiceProvLRN instances written to MidwestDB
      3000 ServiceProvLRN instances written to MidwestDB
      4000 ServiceProvLRN instances written to MidwestDB
      4700 ServiceProvLRN instances written to MidwestDB
      5700 ServiceProvLRN instances written to MidwestDB
      Import completed successfully.
      Download Process Completed for LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Delete Process for 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Will drop instances of:
      Drop instances of class `SubscriptionVersion'
      DROPPING INSTANCES.
      Delete Process Completed for 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Download Process for 000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      1000 SubscriptionVersion instances written to MidwestDB
      2000 SubscriptionVersion instances written to MidwestDB
      3000 SubscriptionVersion instances written to MidwestDB
      4000 SubscriptionVersion instances written to MidwestDB
      4500 SubscriptionVersion instances written to MidwestDB
      Import completed successfully.
      Download Process Completed for 000000-999999.11-07-2001145342
      
      Beginning Delete Process for 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Will drop instances of:
      Drop instances of class `NumberPoolBlock'
      DROPPING INSTANCES.
      Delete Process Completed for 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      Beginning Download Process for 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      
      1000 NumberPoolBlock instances written to MidwestDB
      2000 NumberPoolBlock instances written to MidwestDB
      Import completed successfully.
      Download Process Completed for 0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849
      Script completed.
      
    • If you are reversing an NPA split, in this step the LSMS deletes all subscription versions and NPBs for the old NPA-NXX and the erroneous new NPA-NXX in the regional LSMS database, reformats the NPAC data file, and places the data from the NPAC data file into the specified regional LSMS database. (Example output is not shown.)
    • If you are converting a regional database to support EDR, in this step the LSMS formats the NPAC data file, and places the data from the NPAC data file into the specified regional LSMS database. (Example output is not shown.)
  30. If you specified the -c option or you answered Y when prompted for any failure, such as syntax error, that occurred during the import process in 29, perform the one of the following sets of substeps:

    Caution:

    This step requires a working knowledge of the vi editor and detailed understanding of the contents of the files downloaded from the NPAC. It is recommended that the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 be contacted prior to performing this step.

    If you answered Y when prompted for any failure during the import process in downloading-files-npac-lsms1.html, perform these substeps:

    1. Examine and correct the files that were not successfully imported by entering the following command:
      $ vi /var/TKLC/lsms/free/data/npacftp/<region>/<downloaded file>

      For example:

      $ vi /var/TKLC/lsms/free/data/npacftp/Midwest/SPID.07-10-2000023849

    2. Delete the ^D characters added at the end of the file by the vi editor by pressing the Shift and G keys at the same time to go to the end of the file, and then typing dd to remove the last line.
    3. For each file corrected by downloading-files-npac-lsms1.html a and b, enter the following command to import the corrected file into the regional database:
      $ $LSMS_DIR/import <region> <bulk load file>
    4. Go to step downloading-files-npac-lsms1.html.

    If you specified the -c option in downloading-files-npac-lsms1.html, perform these substeps:

    1. Examine and correct the files that were not successfully imported by entering the following command:
      $ vi /var/TKLC/lsms/free/data/npacftp/<region>/<downloaded file>

      For example:

      $ vi /var/TKLC/lsms/free/data/npacftp/Midwest/SPID.07-10-2000023849_FAILED

    2. Correct the file as desired, and then import the file into the database by entering the following command, where <region> is the name of the NPAC region, <instance> is the type of instance to be imported into the database, and <filename> is the name of the file to be imported:
      $ $LSMS_TOOLS_DIR/npacimport -r <region> -i <instance> -y <filename>
  31. If you are reversing an NPA split, go to step downloading-files-npac-lsms1.html.
    Otherwise, perform the following substeps:

    Table C-6 NPAC Bulk Load Files and LSMS Database Object Classes

    NPAC Bulk Load File LSMS Database Object Class

    000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849

    SubscriptionVersion

    0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849

    NumberPoolBlock

    LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849

    ServiceProvLRN

    NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849

    ServiceProvNPA_NXX

    NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849

    ServiceProvNPA_NXX_X

    SPID.07-11-2004023849

    ServiceProvNetwork

    These substeps compare the number of instances of each object type (shown in bold in the following examples) contained in the NPAC files and in the LSMS database.
    1. Enter the following command to display the number of lines in each bulk load file:
      $ wc -l *

      Output similar to the following appears:

      • If you are downloading files from the NPAC after a site failure or during migration, output similar to the following appears. This output includes lines (shown in bold) used for Efficient Data Representation (EDR). If an NPAC does not support EDR, or if you do not have the EDR feature installed, lines similar to those shown in bold will not appear.
        
             1892
          000000-999999.07-11-2004023849.07-10-2004023849.07-11-2004023849    
             892  0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849         250
          LRN.07-11-2004023849.07-10-2004023849.07-11-2004023849           23
          NPANXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
              12  NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849        5
          SPID.07-10-2004023849
        
      • If you are converting a regional database to support EDR, output similar to the following output appears.
         892
          0000000-9999999.07-11-2004023849.07-10-2004023849.07-11-2004023849  12
          NPANXXX.07-11-2004023849.07-10-2004023849.07-11-2004023849
        
    2. Enter the following command to display the total number of instances of each class in the regional database:
      $ lsmsdb -c counts -d <dbname>

      Output similar to the following appears:

      
      $ lsmsdb -c counts -d MidwestDB 892
       ........... MidwestDB.NumberPoolBlock 250
       ........... MidwestDB.ServiceProvLRN 23
       ............ MidwestDB.ServiceProvNPA_NXX 12
       ............ MidwestDB.ServiceProvNPA_NXX_X 5
       ............. MidwestDB.ServiceProvNetwork 1,892
       ......... MidwestDB.SubscriptionVersion
      #
      
    3. Verify that the numbers of instances indicated in the output of downloading-files-npac-lsms1.html b (shown in bold in the example) match the numbers included in the output of downloading-files-npac-lsms1.html a (shown in bold in that example). If they do not match, repeat downloading-files-npac-lsms1.html through downloading-files-npac-lsms1.html
  32. If you are converting a regional database to support EDR, go to downloading-files-npac-lsms1.html.
    Otherwise, perform the following command to change the Last Change Time (LCT) of the regional database to match the timestamp embedded in the file name of the files obtained in downloading-files-npac-lsms1.html.

    $ chglct -r <region> -s <YYYYMMDDhhmmss>

    Where <region> is the name of the NPAC for which you are performing the download and <YYYYMMDDhhmmss> is the timestamp embedded in the file name as shown in the files displayed in downloading-files-npac-lsms1.html. For more information about the chglct command, see “chglct”.
  33. Once you have verified that the region has received a "Recovery Complete" message from the NPAC, you may remove the "import" files from the system by repeating 2 through 6 of this procedure.
  34. Restart the LSMS agent for the region by doing the following:
    From the LSMS GUI menu, select Configure, and then LNP System, and then NPAC, and then Modify, and then Primary and click the Activate Region checkbox so that is checked. For more information about this GUI window, refer to the Configuration Guide. Having this checkbox checked enables the sentryd utility to automatically attempt to restart the regional agent.
  35. If the SWIM feature was turned off in 26, contact the NPAC to have the SWIM list cleared for all imported regions, then contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 to reactivate SWIM.
  36. If imports were performed for all active regions, go to downloading-files-npac-lsms1.html Otherwise, contact the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 to determine if time range resynchronizations are needed for regions that were not imported due to SWIM having been turned off temporarily.

    If necessary, the unresolvable-reference.html#GUID-646F2C79-C167-4B5A-A8DF-7ED0EAA9AD66 will help the customer reassociate LSMS with the NPAC and perform manual time range resynchronizations.

  37. Restart the LSMS GUI for the region. by entering the following command:
    $ $LSMS_DIR/start_mgui

    For example:

    $ $LSMS_DIR/start_mgui

  38. Repeat steps downloading-files-npac-lsms1.html through downloading-files-npac-lsms1.html for each NPAC region for which you have downloaded files.
  39. For each network element supported by the LSMS, resynchronize the data that corresponds to the data downloaded from the NPAC, using one of the procedures described in LNP Database Synchronization User's Guide. For example:
    • If you downloaded from the NPAC after a site failure or during migration, perform a time range audit or a bulk download to each supported network element (refer to “Auditing and Reconciling Network Elements from the LSMS” or “Managing Bulk Load from the LSMS”).
    • If you have reversed an NPA split, perform an audit and reconcile procedure for subscription versions and NPBs in both the old NPA-NXX and the erroneous new NPA-NXX to each supported network element (refer to “Auditing and Reconciling Network Elements from the LSMS”).
    • If you have converted a regional database to support EDR, perform an audit and reconcile procedure for all NPBs to each supported network element (refer to “Auditing and Reconciling Network Elements from the LSMS”).

Copying Files to Other Server If Switchover Occurs

When switchover (whether automatically or manually initiated) occurs, the standby server, which has been replicating the database on the active server, takes over to be the newly active server. However, any files that have been downloaded from the NPAC exist only on the server to which they were downloaded. If switchover occurs during a BDD procedure, the quickest way to get the files on the newly active server is to perform one of the procedures described in this section.

The following notifications indicate that a switchover has been initiated and completed:


LSMS4000|14:58 Oct 22, 2005|xxxxxxx|Notify:Sys Admin - Switchover initiated
LSMS4001|14:58 Oct 22, 2005|xxxxxxx|Notify:Sys Admin - Switchover complete

Perform one of the following procedures:

Copying All Downloaded Files After Switchover

If switchover is initiated and completed after all the files you need have been downloaded from the NPAC but before you have imported them into the LSMS database, perform the following procedure.

  1. If switchover is initiated between the time all the files have been downloaded from the NPAC and the time they are to be imported into the LSMS, wait until the following notification has been reported:
    
    LSMS4001|14:58 Oct 22, 2005|xxxxxxx|Notify:Sys Admin - Switchover complete
    
  2. Log into the non-active server as lsmsadm.
  3. Navigate to the directory where files have been downloaded:
    $ cd /var/TKLC/lsms/free/data/npacftp/<region>

    Where <region> is the name of the NPAC region for which files are being downloaded.

  4. Verify that the correct directory was accessed by entering the following command:
    $ pwd

    The correct output is:

    
    /var/TKLC/lsms/free/data/npacftp/<region>
    
  5. Use the secure file transfer protocol (sftp) to move the files from the previously active server into the /var/TKLC/lsms/free/data/npacftp/<region> directory on the newly active server:
    $ sftp lsmsadm@mate

    When prompted, enter the lsmsadm password. Then the sftp> prompt will appear; enter the following commands at the prompt:

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

    sftp> mput *

    sftp> bye

  6. Proceed with the step you were performing when you were directed to this procedure.

Copying Partially Downloaded Files After Switchover

If switchover is initiated and completed while files are being downloaded from the NPAC, some of the files may exist on the previously active server and some may exist on the newly active server. The safest procedure is to repeat the BDD procedure.

However, if you have already downloaded a number of files, you can choose to determine which files exist on which server and use the following procedure to copy the files that exist on the non-active server to the active server.

  1. If switchover is initiated while files are being downloaded from the NPAC, wait until the following notification has been reported:
    LSMS4001|14:58 Oct 22, 2005|xxxxxxx|Notify:Sys Admin - Switchover complete
  2. Log into the non-active server as lsmsadm.
  3. Navigate to the directory where files have been downloaded:
    $ cd /var/TKLC/lsms/free/data/npacftp/<region>
    Where <region> is the name of the NPAC region for which files are being downloaded.
  4. Verify that the correct directory was accessed by entering the following command:
    $ pwd

    The correct output is:

    
    /var/TKLC/lsms/free/data/npacftp/<region>
    
  5. Enter the following command to list which files are stored in this directory:
    $ ls -l
  6. Log into the active server as lsmsadm.
  7. Navigate to the directory where files have been downloaded:
    $ cd /var/TKLC/lsms/free/data/npacftp/<region>

    Where <region> is the name of the NPAC region for which files are being downloaded.

  8. Verify that the correct directory was accessed by entering the following command:
    $ pwd

    The correct output is:

    
    /var/TKLC/lsms/free/data/npacftp/<region>
    
  9. Enter the following command to list which files are stored in this directory:
    $ ls -l
  10. Compare the files listed in 5 and 9 to determine whether all the files you need have been downloaded to one server or the other.
    If any files you need are missing from both servers, perform the procedure described in NPAC-LSMS Download Procedure” to obtain the missing files from the NPAC.
  11. If you desire to copy any files from the non-active server to the active server, perform the remaining steps of this procedure.
  12. At the previously active server, use the secure file transfer protocol (sftp) to move the files from the standby server into the/var/TKLC/lsms/free/data/npacftp/<region> directory on the newly active server:
    $ sftp lsmsadm@mate

    When prompted, enter the lsmsadm password. Then the sftp> prompt will appear; enter the following commands at the prompt:

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

    sftp> mput *

    sftp> bye

  13. Proceed with the step you were performing when you were directed to this procedure.