You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

How can I transfer files from a DB server to an external server and then return them to the DB using a 'middle' server?

This Page is Still 'Work in Progress'

In more detail:

  1. Start a database procedure to generate an exchange file and transfer this file to a "middle" server.
  2. Determine the size of the transfer file on the middle server and use a script to transfer this file to an external server.
  3. Process data on the external server and confirm that the result file have been generated before starting a script on the middle server to transfer the file from external server to the middle one.
  4. After the script in step 3 has finished transferring the file from the external server, start a database procedure to import the transferred file to the database.

In particular, I want to know how to invoke remote script and DB procedure? I checked the document in your official website but didn’t get any clue about this. Can jobscheduler fulfill our requirement?
Thanks.

Solution

There are several ways to implement such a scenario.

A typical workflow would be to use a single JobScheduler installed on the middle server with a job chain with several steps:

 *Step (1) start the DB report. Here you can use the [SQL*Plus|http://www.sos-berlin.com/doc/JITL/SOSSQLPlusJob.xml], [PL/SQL|http://www.sos-berlin.com/doc/JITL/JobSchedulerPLSQLJob.xml] or the [ManagedDatabase|http://www.sos-berlin.com/doc/JITL/JobSchedulerManagedDatabaseJob.xml] jobs from the [JITL package|http://www.sos-berlin.com/mediawiki/index.php/Standard_Jobs_Overview].
  • Step (2) check the size/existence/content of the output from step 1 using the existsFile job from the JITL-Package.
  • Step (3) transfer the file from the middle server to the external one using, for example, sFTP and the JADE-Job from the JITL package.
  • Step (4) start the processing on the external server using SSH.
  • Step (5) Use sFtp and the JADE-Job to transfer the result of step (4) to the middle server.
     *Step (6) Start the processing of the result file using, for example, SQL*Plus or PL/SQL.
    
  • No labels