SFTP using PL/SQL [message #650920] |
Fri, 06 May 2016 10:21  |
Lucky A
Messages: 68 Registered: October 2007
|
Member |
|
|
Hi to all,
How can I execute sftp file transfer directly from the oracle database using pl/sql?
Any assistance will be helpful.
Thanks,
Lucky A
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: SFTP using PL/SQL [message #651768 is a reply to message #651698] |
Tue, 24 May 2016 21:47   |
Lucky A
Messages: 68 Registered: October 2007
|
Member |
|
|
Hi All,
To answer the concern raised and to provide feedback:
The client uses RD Web Access to copy the XML files from a third party server to a local SFTP server.
I was asked on this forum why External Table is not an option. Because the client thinks if the use of External table is considered, then they either have to join all of the XML files or create thousands of external tables. Remember they have thousands of XML files been transferred daily. Also, do I know the content of the files or how they are related to one another? The answer at this preliminary stage, is no.
Using DBMS_Scheduler to launch scp creates security risk to the database - using the database to call an external procedure violates STIG requirements. The database is put at risk to unauthorized access to the procedure from outside of the database process...
The objective of the client is to be able to read the data of the XML files directly from the SFTP server, parse it and then load it into the database. They want to bypass the step of getting the XML files to a local server.
I came to this forum for guidance and to find out the possibility of achieving the client's objective - to find out whether the means of achieving this objective exist and how it can be achieved. After hearing your expert opinions and directives, it seems that the client's objective is implausible or if remotely possible, it will be time consuming and convoluted at best to achieve.
To beg the question; I am looking at what's plausible to get the XML data from the SFTP server onto the database. If it means pulling, on a daily basis, thousands of files unto a local machine and using External Table, then I'm open to such solution. But please give me example(s) on how to achieve what you suggest...
Thanks and best regards,
Lucky
|
|
|
|
|
|
Re: SFTP using PL/SQL [message #651885 is a reply to message #651774] |
Thu, 26 May 2016 13:47  |
Lucky A
Messages: 68 Registered: October 2007
|
Member |
|
|
With all of your inputs and having a clearer understanding of what the client wants and presenting the various options attainable, the best method is to use JSch API which is Java based to accomplish the task.
Thank you,
Lucky
|
|
|
|