Exporting and importing Oracle or PostgreSQL database in LFT 2.0 and 3.x
  1. guides
  2. en
  3. Knowledge base
  4. Setup, installation, and configuration issues
  5. Exporting and importing Oracle or PostgreSQL database in LFT 2.0 and 3.x

Exporting and importing Oracle or PostgreSQL database in LFT 2.0 and 3.x

How to Export and Import the Oracle or PostgreSQL Database in LFT 2.0 and 3.x

Overview

This article details how to
export
and
import
the
Oracle
database (DB) or
PostgreSQL
DB in the Lexmark Fleet Tracker (
LFT
) versions
2.0
and
3.x
.

Exporting the database

Follow the instructions specified per version below. See How to Locate Version Information of Various Lexmark Fleet Manager Collectors to view steps to identify LFT versions.
LFT version 2.0
Open the command prompt, then type C:\user\>
exp system/manager366 file=dbackup.dump full=yes
LFT version 3.x (Oracle DB)
You will have to back up
two
Oracle users; i.e.,
Transactional
and
Historical
DBs. These Oracle users were created upon install using
createORA.sql
commands.
You may
export
these using a
SQL developer tool
(e.g., DBeaver) or by performing the following steps:
Transactional dB users
- First, stop the LFT service before performing the export procedure.
For...
Type...
Where...
Transactional DB
C:\user\>exp ID/ PW file=ID.dmp
  • ID
    is the
    userID
    for transactional DB user.
  • PW
    is the
    password.
  • ID.dmp
    is the
    custom filename
    of the transactional DB.
Historical DB
C:\user\>exp
IDdwh
/
PW
file=
IDdwh.dmp
  • IDdwh
    is the for historical (also known as datawarehouse)
    userID
  • PW
    is the
    password
  • IDdwh.dmp
    is the
    custom filename
    of the historical DB.
LFT version 3.x (PostgreSQL DB)
  1. Log in as the
    Administrator
    to the
    LFT 3.x Host Server
    .
  2. Go to
    Start
    , type
    Services
    , open the
    Services
    window, and then
    Stop
    the Lexmark Fleet Tracker service.
    Note:
    Do
    not
    stop any other Fleet Tracker services.
  3. Click on
    Start
    >
    All Programs
    >
    Lexmark Fleet Tracker
    >
    PostgreSQL 9.1
    > pgAdmin III
    Note:
    This will open up the DB
    Administration pane
    .
  4. Click on the Plug icon to
    Add a Connection to Server
    .
  5. Name the connection, type the
    username
    and
    password
    , and then click
    OK
    .
    Note:
    The
    username
    and
    password
    should be the administrative log in credentials of the PostgreSQL DB as established during the LFT 3.x installation.
  6. On the server connection menu, expand the
    Servers
    folder to display the
    Databases
    , right-click on the
    lfm
    database, and then click Backup.
  7. Name the backup file, set Format to
    Tar
    , set Rolename to
    SYSTEM
    , and then click
    Backup
    . Click here to view image.
    Note:
  8. Repeat
    Steps 6
    and
    7
    for the
    lfmdwh
    database.
  9. Go to
    Start
    , type
    Services
    , open the
    Services
    window, and then
    Start
    the
    Lexmark Fleet Tracker
    service.
    Note:
    The
    default installation path
    for the PostgreSQL DB backup files is the C:\Program Files\Lexmark\Fleet Tracker folder. Otherwise, the files will be created in the directory you specified during installation.
Important!
Lexmark highly recommends
copying
or
moving
these
backup files
to another location to protect against possible failure of the LFT 3.x Host Server.

Importing the database

In the event that an import is necessary, follow the instructions specified per version below.
The images may not always appear the same for all.
LFT version
Action
LFT version
2.0
  1. Stop LFT services a. Open the command prompt. b. Go to
    C:\Lexmark\Lexmark_LFT
    (or wherever LFT is installed), and then type
    pServices.exe –stop
    .
  2. Drop the tables.
    Note:
    You will need this drop.sql script.
    a. Open the command prompt. b. Change the directory to where the
    drop.sql
    is saved, and then type sqlplus PrinterRx/Manager @drop.sql.
    Note:
    After pressing enter, you will start to see Table dropped“ ” messages. Wait until the prompt appears again.
  3. Import the database. a. Type C:\user\>
    imp system/manager366 file=dbackup.dump full=yes
    Start LFT services a. Open the command prompt. b. Go to
    C:\Lexmark\Lexmark_LFT
    (or wherever LFT is installed), and then type
    pServices.exe –start
    .
LFT version
3.x
(Oracle DB)
  1. Stop the LFT services. a. Go to
    Start
    , type
    Services
    , and then open the Services window.b. Locate Lexmark Fleet Tracker, and then
    stop
    the service.
  2. Drop the user data. a. Open the command prompt b. Type the following:
    sqlplus system/manager366 drop user ID cascade; drop user IDdwh cascade; commit;
    Where
    ID
    is the userID for the transactional DB and
    IDdwh
    is for the datawarehouse.
  3. Create userid using the createORA.sql.a. Open the command prompt. b. Change the directory to where the script is, and then type
    sqlplus system/manager366 @createORA.sql
    ID PW
    .
    Where
    ID
    and
    PW
    are the LFM database userID and password, which the exported backup uses.
  4. Import the database a. Open the command prompt. b. To import transactional data, type
    imp ID/PW file=ID.dmp
    . c. To import historical data, type
    imp IDdwh/PW file=IDdwh.dmp
    .
  5. Start the LFT services and perform a test.a. Go to
    Start
    , type
    Services
    , and then open the Services window. b. Locate Lexmark Fleet Tracker, and then
    start
    the service.
LFT version
3.x
(PostgreSQL DB)
In case of failure, you may restore the LFT 3.x database to the latest available backup files for the “
lfm
” and “
lfmdwh
” databases, given that the
LFT 3.x tool
being restored is the
same version
as the LFT 3.x backup file.
Perform the following steps once the LFT 3.x tool has been installed and the proper license file has been applied:
  1. Go to
    Start
    , type
    Services
    , open the
    Services
    window, and then
    Stop
    the Lexmark Fleet Tracker service.
  2. Click on
    Start
    >
    All Programs
    >
    Lexmark Fleet Tracker
    >
    PostgreSQL 9.1
    > pgAdmin III.
    Note:
    This will open up the DB
    Administration pane
    .
  3. Click on the Plug icon to
    Add a Connection to Server
    .
  4. Right-click on the
    lfm
    DB, and then click Delete/Drop.
  5. Right-click on
    Databases
    , and then click New Database.
  6. Name the new DB
    lfm
    , set Owner to
    SYSTEM
    , and then click
    OK
    .
    Note:
    This will create a new
    lfm
    DB. This step is necessary to ensure that you are restoring a
    clean
    DB with
    no
    existing tables that may interfere with the restore process.
  7. Right-click on the new
    lfm
    DB, and then click Restore.
  8. Set Format to
    Tar
    , set Rolename to
    SYSTEM
    , and then click on the "
    ...
    " button to browse for the file.
    Click here to view image.
  9. Navigate to the appropriate file location and then click
    Open
    .
  10. Click Restore to complete the process.
    Note
    : Lexmark recommends accepting the default settings and
    not
    modifying anything in the
    Restore Options…
    tabs.
    Click here to view sample result.
  11. Repeat
    Steps 4
    7
    for the
    lfmdwh
    database.
  12. Go to
    Start
    , type
    Services
    , open the
    Services
    window, and then
    Start
    the
    Lexmark Fleet Tracker
    service.
LEGACY ID:
HO3950