; Note: comment lines in .INI files always start with a semicolon [Template] Description=Use this template to create database replication job that can replicate data accross different database systems [Variables] ; Key values that have their name enclosed in % signs will be used for ; template wizard questionnaire and substitution variables ; such key values should consist of 2 comma separated parts: ; 1. Field Edit Style (EDIT, YES/NO, FILE BROWSE, ; DIR BROWSE, PROCESS BROWSE, ; FTP BROWSE, MAIL PROFILE LIST, ; REMOTE FILE BROWSE, REMOTE DIR BROWSE, ; REMOTE AGENT LIST, DB PROFILE LIST) ; 2. Prompt ; ; Example: %VAR%=EDIT,What is the name of the service that you want to monitor? ; ; Key values that don't have their name enclosed in % signs will be used for ; job properties (See online help on "Job property names for use with JDL command" ; topic for more details). ; ; Example: DAY_NUMBER=1 %SRC_DB_PROFILE%=DB PROFILE LIST,Which database is the source database? %TGT_DB_PROFILE%=DB PROFILE LIST,Which database is the target database? %SRC_TABLE%=EDIT,From which database table/view do you want to get data? %TRG_TABLE%=EDIT,Into which database table do you want to load data? %RECIPIENT%=EDIT,To whom do you want to sent email alerts when replication fail? %EMAIL_PROFILE%=MAIL PROFILE LIST,If you use MAPI email interface, then which email profile do you want to use? If you use Lotus Notes or SMTP email interfaces, enter User ID required for logging to your email system. %EMAIL_PASSWORD%=EDIT,If you are required to login to your email system, what is your password? JOB_TYPE=S SCHEDULE_TYPE=D ASYNC=Y SKIP=N RETRY_ON_ERROR=Y RETRY_INTERVAL=600 NUMBER_OF_RETRIES=2 MSG_ERROR=Y MSG_EMAIL=Y MSG_ACCOUNT=%EMAIL_PROFILE% MSG_PASSWORD=%EMAIL_PASSWORD% MSG_RECIPIENT=%RECIPIENT% DESCRIPTION=This job replicates data from a table/view in one database to a table in another database. It will send an email alert to the specified recipient if the replication fails. ; Notes: The script bellow can include substitution variables. ; Substitution variables must be specified in %VAR% format ; where VAR is the variable name. ; ; Everything after the next line will be used for the template script. ;======================================================================================== [Body] Dim rows_copied, number Dim message, string // Execute database pipe Dim rows_copied, number DatabasePipe "%SRC_DB_PROFILE%", & "%TGT_DB_PROFILE%", & "SELECT * FROM %SRC_TABLE%", & "%TGT_TABLE%", & "INSERT", & rows_copied // send notification ConcatEx, rows_copied, " rows inserted/replaced from %SRC_TABLE% (%SRC_DB_PROFILE%) into %TGT_TABLE% (%TGT_DB_PROFILE%)", message MailSend "%EMAIL_PROFILE%", "%EMAIL_PASSWORD%", "%RECIPIENT%", "Database Replication Status", message