如何从Oracle 10g数据库(10.2.0.3)上的PLSQL SFTP CSV文件 [英] How to SFTP a CSV file from PLSQL on a Oracle 10g database (10.2.0.3)

查看:186
本文介绍了如何从Oracle 10g数据库(10.2.0.3)上的PLSQL SFTP CSV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序使用UTL_FILE生成CSV文件并将其写入数据库服务器位置,然后SFTP应该将该文件传输到所需的共享位置.

My Application generates a CSV file using UTL_FILE and writes the file to the DB server location,then the SFTP should transfer that file to a desired shared location.

第一部分已完成,第二部分需要帮助,即使用PLSQL的SFTP

First part is done,need help in the second one i.e SFTP using PLSQL

谢谢

推荐答案

虽然完全有可能使用UTL_TCP包在PL/SQL中编写SFTP客户端,但这不太可能是一种实用的方法.一般来说,您有几个选择

While it is entirely possible to write a SFTP client in PL/SQL using the UTL_TCP package, that is unlikely to be a practical approach. In general, you have a couple options

  1. 使用许多
  1. Create a Java stored procedure using one of the many Java SFTP libraries and call that Java stored procedure from PL/SQL.
  2. Create a shell script that does the SFTP using the server's command-line utililties and call that shell script either using DBMS_SCHEDULER or via a Java stored procedure.

如果您的Oracle数据库在Windows上运行,则您还可以在上述两个选项中的任何一个中编写.Net存储过程,而不是Java存储过程.但是,Java存储过程会更常见.

If your Oracle database is running on Windows, you could also write a .Net stored procedure rather than a Java stored procedure in either of the two options above. A Java stored procedure, however, would be much more common.

这篇关于如何从Oracle 10g数据库(10.2.0.3)上的PLSQL SFTP CSV文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆