Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Info | ||
---|---|---|
| ||
revision required, a duplicate article might exist |
Question about file transfer
How can I transfer files from a DB database server to an external server and then return them to the DB database using a ' middle ' server?
This Page is Still 'Work in Progress'
In more detail:
Solution Outline
- Start a database procedure to generate an exchange file and transfer this file to a "middle" server.
- Determine the size of the transfer file on the middle server and use a script to transfer this file to an external server.
- 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.
- 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.
The file movements would look like this:
Schema of File Movements
Question about scripts and database procedures
In particular, I want to know how to invoke remote script and DB database procedure? I checked the document in your official website but didn’t get any clue about this. Can jobscheduler JobScheduler fulfill our requirement?
Thanks.
Solution Outline
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 database report. you You can use the SQL*Plus, PL/SQL or the ManagedDatabase jobs from the JITL package.
- Step (2) check the size/existence/content of the output from step 1 using the
existsFile
job from the JITL -Packagepackage. - Step (3) transfer the file from the middle server to the external one using, for example, sFTP SFTP and the JADE-Job from the JITL package.
- Step (4) start the processing on the external server using SSH.
Step (5) Use sFtp SFTP and the JADE -Job 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.