Using Script Examples
This section provides several example script files. Review these scripts to see how you can use PeopleSoft Data Mover to accomplish various tasks.
Description
This example shows how to export a database.
Example
SET OUTPUT c:\temp\pt.dat;
SET LOG c:\temp\pt.log;
EXPORT *;
Description
This example shows how to build a database.
Example
set log c:\temp\hcengd.log;
set input c:\HRDMO\data\hcengd.db;
set no view;
set no space;
set no trace;
import *;
update PSLOCK set OWNERID = <OWNER_ID>;
update PSOPRDEFN set ACCESSID = <ACCESS_ID>, ACCESSPSWD = <ACCESS_ID_PSWD>,
PTOPERPSWDV2= '0000000000000000' where OPRTYPE = 0;
update PSACCESSPROFILE set STM_ACCESS_ID = <ACCESS_ID>, STM_ACCESS_PSWD = <ACCESS_ID_PSWD>,
VERSION = 0, ENCRYPTED = 0;
set log c:\temp\grant.log;
encrypt_password *;
Then run the resetpswd.dms data mover script from the PS_HOME/scripts directory.
Description
This example shows how to recreate all views.
Example
SET LOG c:\temp\view.log;
REPLACE_VIEW *;
Description
This example shows how to import with REPLACE_ALL with a commit level.
Example
SET INPUT c:\ptdvl\bin\exp2.dat;
SET LOG c:\ptdvl\bin\exp2.log;
SET COMMIT 2;
REPLACE_ALL employee_review;
REPLACE_ALL course_tbl
WHERE days_duration = :1 AND course_type > :2;number,1,char,C;
REPLACE_ALL absence_hist
WHERE return_dt > :1;date,1988-01-01;
Description
This example shows how to combine SQL commands and IMPORT.
Example
SET INPUT c:\ptdvl\bin\exp2.dat;
SET COMMIT 10;
SET START AFTER course_tbl;
SET IGNORE_DUPS;
DELETE FROM ps_absence_hist WHERE emplid = '8001';
IMPORT *;