Top Banner
An Introduction to PeopleSoft Data Mover
20

SOAIS Introduction to Datamover

Sep 03, 2014

Download

Documents

bpalakk
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SOAIS Introduction to Datamover

An Introduction to

PeopleSoft Data Mover

Page 2: SOAIS Introduction to Datamover

2

Data Mover provides a convenient way to

perform the following tasks:

Transfer application data between PeopleSoft databases

Move PeopleSoft databases across operating systems and database platforms

Execute SQL statements against any PeopleSoft database, regardless of the underlying operating system or database platform

Control database security and access

PeopleTools version in source & target should match.

Page 3: SOAIS Introduction to Datamover

3

Data Mover – Key Points

You use Data Mover to create, edit, and run scripts

These scripts may include any combination of SQL commands and Data Mover commands for exporting and importing database contents

Data Mover scripts can be scheduled to run from PeopleSoft Process Scheduler

The default file extension for scripts is .DMS

The Data Mover development environment can be invoked from PeopleTools (through the Data Mover shortcut in the PeopleSoft program group)

Page 4: SOAIS Introduction to Datamover

4

The Data Mover Window

The Data Mover interface is split horizontally into two panes: An input and output pane.

Page 5: SOAIS Introduction to Datamover

5

Input and Output Panes

The input pane (window) is where the script you've openedappears. The input pane is where you can view and edit DataMover scripts, if necessary.

The output window displays the script run results. If youencounter any errors the output window will show where thescript failed

Note. The results shown in the output window, as shown in the Data Mover Window example, are saved to the file DATAMOVE.LOG by default, which is written to the default log directory. You can also specify your own file name.

Page 6: SOAIS Introduction to Datamover

6

Menu Options

There are four menu bar items in the Data Mover window: File, Edit, View, and Help.

File Contains options to Open, Save, Save As, Run Script, and Exit.

Edit The selections in this menu item are similar to those of most text editors: Undo, Cut, Copy, Paste, and Clear. Also you will find, Select All, Find, Replace, and Repeat.

View Using the View menu list, you can opt to hide the Toolbar and/or the Status Bar. Both appear by default.

Help Contains the Standard PeopleSoft help options.

Page 7: SOAIS Introduction to Datamover

7

Operating Mode

There are two modes in which Data Mover can be operated:

Regular Mode

Most of the time you will log onto Data Mover in regular mode. To do this, yousimply enter your PeopleSoft operator ID and password at the sign on screen. Inregular mode, all commands are valid.

Bootstrap Mode

There are times when you may need to launch Data Mover using the databaseaccess ID and password. This is called launching in "bootstrap" mode. Typically,using bootstrap mode is necessary for database loading, because there are noPeopleSoft security tables established yet. You'll also find it helpful for accomplishingother security-related tasks, such as running ENCRYPT_PASSWORD commandsBootstrap mode does not support certain commands like Export, which work fromthe Regular mode

Page 8: SOAIS Introduction to Datamover

8

Example of DMS

SET LOG c:\temp\data_exp.log;SET OUTPUT c:\temp\absence.dat/EXPORT absence_hist;EXPORT employee_tbl/

Script for source database

Script for target database

SET LOG c:\temp\data_imp.log;SET INPUT c:\temp\absence.dat;DELETE FROM ps_absence_hist;DELETE FROM ps_employee_tbl/IMPORT */

Page 9: SOAIS Introduction to Datamover

9

Rule 1With the exception of double-dash (--) comment statements, every command statement must be followed by a delimiter.

Semicolon (;). A semicolon can reside on the same line as the command itself, or by itself on the line immediately following a command statement. For example, the following two uses of the semicolon delimiter are valid:

• SET OUTPUT c:\temp\abc.dat;• SET LOG c:\temp\new.log

;•Forward slash (/). This delimiter can be used only on a line by itself, in column 1, on a line immediately following a command statement. For example:• IMPORT *

/

Rule2With the exception of double-dash (--) comment statements, statements may span multiple lines. For example:

EXPORT absence_histWHERE absence_type = 'A';

Syntax Rules

Page 10: SOAIS Introduction to Datamover

10

Rule 3

A double-dash (--) comment statement does not require a delimiter termination. However, each statement can't span more than one line. Also, make sure you add a space after the (--) before you start your comment. For example:

-- This script imports the information stored in

-- the ABC.DAT file.

Rule 4Statement text is case insensitive. For example, IMPORT * ;is equivalent to import * ;

Syntax Rules

The REM and REMARK keywords too are used to designate comment statements. For example:

REM This demonstrates the use of the REM to set off script comments.

These statements can span over multiple lines and must be terminated

with a valid delimiter;

Page 11: SOAIS Introduction to Datamover

11

Data Mover Commands

EXPORT

Creates a single data file (.dat extension) containing the specified database contents. The result set can contain any of the following: a) A single PeopleSoft recordb) A group of recordsc) The entire database

You can use the generated export file as input for migrating to another platform.

SyntaxEXPORT {record | *} [WHERE conditions];

The WHERE keyword must be on the same line as the EXPORT command

ExampleTo export a single record, use an EXPORT command for the specific record. For example:

EXPORT PS_JOB;

EXPORT NAMES WHERE UPPER(NAME) LIKE ‘%ARUN%’;

To export all PeopleSoft records, including views, enter

EXPORT *;

Page 12: SOAIS Introduction to Datamover

12

Data Mover Commands

IMPORTInserts data into a table or tables using the information in an export file. If a tablespace or table does not exist, this command creates tablespace, table, and indexes for the record, using the information in the export file, and inserts the data.Views are created, if the export file was created using EXPORT * and imported using IMPORT *.

SyntaxIMPORT {record | *} [IGNORE_DUPS] [AS new_table_name];

IGNORE_DUPS option is only valid in bootstrap mode.

ExampleTo import a single record from an export file, use an IMPORT command for that record. For example:SET INPUT file_name;

IMPORT PS_JOB;

To import all PeopleSoft records from an export file, including views, enter:SET INPUT file_name;

IMPORT *;

The following example imports a new record or table originally named PS_JOB and creates it as PS_PROCESS:IMPORT JOB AS ps_process;

Page 13: SOAIS Introduction to Datamover

13

Data Mover Commands

REPLACE_ALLA variation of the IMPORT command. If a table already exists, use this command to drop the table and its indexes from the database and create the table and indexes using the information in the export file. Then, it inserts data into the table using the information in the export file

SyntaxREPLACE_ALL {record | *};

REPLACE_DATAA variation of the IMPORT command. Deletes data in existing table(s) and inserts the corresponding data from the export file.

SyntaxREPLACE_DATA {record | *};

Page 14: SOAIS Introduction to Datamover

14

Data Mover Commands

RUNExecutes a specified .DMS file from within a Data Mover script. The file can not contain nested RUN commands. The RUN command cannot contain a directory path. The RUN command uses the same directory as the current PeopleSoft Data Mover script in which RUN is used.

SyntaxRUN dms_file_name;

SETThe SET command, when combined with valid SET parameters, creates statements that establish the conditions under which PeopleSoft Data Mover runs a script.

REPLACE_VIEWThis command Recreates one or all specified views in the database.

SyntaxREPLACE_VIEW {view | *};

Page 15: SOAIS Introduction to Datamover

15

Using SET Parameters

COMMITSets the commit level only for inserting rows and not for DDL statements. If the level is set to 0, commits are only done when all rows for a record are inserted. Due to the expense of recompiling and rebinding after a commit, the default is 0.

PeopleSoft Data Mover issues COMMIT statements after most successful SQL commands, except for EXPORT and IMPORT. For EXPORT and IMPORT, PeopleSoft Data Mover issues a COMMIT after each record.

With IMPORT, a “SET COMMIT n” command performs a COMMIT after the system inserts every n rows.

If you are executing native SQL in PeopleSoft Data Mover, and no COMMIT statements exist in the SQL script, PeopleSoft Data Mover issues a COMMIT after each successful SQL statement.

SyntaxSET COMMIT #of_rows;

ExampleSET COMMIT 2;

Page 16: SOAIS Introduction to Datamover

16

Using SET Parameters

IGNORE_DUPSIgnores duplicate-row error messages from the database; the IMPORT process continues despite any duplicate-row errors displayed in the output window and log file.

The command SET IGNORE_DUPS is only valid in bootstrap mode.

SyntaxSET IGNORE_DUPS;

UPDATE_DUPSWhen used with an IMPORT command, all existing/ duplicate rows are updated.

This command is valid in bootstrap & regular modes.

SyntaxSET UPDATE_DUPS;

Page 17: SOAIS Introduction to Datamover

17

Using SET Parameters

OUTPUTSpecifies a user-defined file name for the output file that is created by the corresponding EXPORT statement. If the SET OUTPUT statement is omitted completely, a default output file with the name DATAMOVE.DAT is created.

SyntaxSET OUTPUT file;

INPUTSpecifies the name of the exported file to import; typically this file has a .DAT extension, though this is not a requirement. As this statement is required to do an import, there is no default file.

SyntaxSET INPUT file;

LOGSpecifies a user-defined file name for the log file that is created when running a PeopleSoft Data Mover script or command. If the SET LOG statement is omitted completely, a default log file is created with the name DATAMOVE.LOG.

SyntaxSET LOG file;

Page 18: SOAIS Introduction to Datamover

18

Using SET Parameters

STARTDesignates where in the export file to start the import process. To start immediately after a particular PeopleSoft record in the file, use SET START AFTER. This is useful for restarting a script after an error.

If the AFTER parameter is omitted, the import process starts at the record that is specified in the SET START statement.

SyntaxSET START [AFTER] record;

ExampleSET INPUT c:\ptdvl\bin\exp2.dat;

SET START AFTER course_tbl;

SET IGNORE_DUPS;

IMPORT *;

NO TRACEIf SET NO TRACE is specified, then no trace file is created. This is strongly recommended.Commands that you run without specifying SET NO TRACE do trace SQL, if SQL tracing is enabled in PeopleSoft Configuration Manager.

SyntaxSET NO TRACE;

Page 19: SOAIS Introduction to Datamover

19

SQL Commands

Data Mover supports the following standard SQL commands:

ALTER

COMMIT

CREATE

DELETE

DROP

Note. With DROP commands, any drop errors are ignored. The script continues, but the errors are reported in the log.

GRANT

INSERT

Note. INSERT cannot be used with SET NO COMMIT or SET NO TRACE.

ROLLBACK

UPDATE

SELECT statements are not supported.

With Data Mover, you can use supported SQL commands in scripts on any supported database platform.

Page 20: SOAIS Introduction to Datamover

20

About SOAIS

SOAIS is a provider of Enterprise IT and Process outsourcing solutions. Since its inception

SOAIS has expanded at a tremendous pace and has garnered customers from both mid-

market segment and Fortune 100 companies. We have experience in managing ERP

applications as well as in providing high value services around packaged enterprise

applications such as PeopleSoft and Oracle. Our experience in the business process

outsourcing area fully extends our services footprint to provide end to end enterprise wide

solutions. See www.soais.com for information.

You can clarify queries or provide feedback on this

presentation at http://www.soais.com click on “Ask the

Expert” link or

send an email to [email protected]