oracle - DBMS_Scheduler get/put file alternative -
i have side project i'm working on requires me copy on .csv file remote ftp , save locally. figured use dbms_scheduler.get_file
not have permission. when asked manager, said wont able privileges , should other ways.
after researching couple of days keep coming dbms_scheduler
, out of luck or searching skills terrible.
thanks
i'm not you'd want use dbms_scheduler
this; understand documentation (never used myself) ftp site have open all; there parameter destination_permissions, it's "reserved future use", i.e. there's no way of specifying permissions @ moment.
if i'm right agree manager, though not same reasons (it seems you'll never permission use dbms_scheduler
hope incorrect).
there other methods of doing this:
utl_tcp
; method of interacting on tcp/ip protocol. oracle base has article, includes ftp package based onutl_tcp
, instructions how use it. requires use ofutl_file
package, can write os files.utl_http
; i'm 99% it's possible connect ftp using this; it's possible connect sftp/any server. it'll require little more work worth in longer run. require use ofutl_file
.a java stored procedure ftp directly; best approach; create 1 using 1 of many java ftp libraries.
a java stored procedure call call os commands; easiest method least extensible. oracle released white paper on calling os commands within pl/sql in 2008 there's plenty of other stuff out there (including oracle base again)
lastly, question whether want do...
what scheduler use? have event driven scheduling? if there's no need ftp within oracle; use
utl_file
write file os , os commands there.was other file in database? if that's case don't need extract it. use
dbms_file_transfer
collect straight database or create jdbc connection or (more simply) database link select data directly.
Comments
Post a Comment