Code Monkey home page Code Monkey logo

Comments (3)

antonscheffer avatar antonscheffer commented on July 25, 2024

You mean read a file from a Oracle directory into a blob, which you can transfer to a SFTP server using this package?
declare
l_bfile bfile;
l_blob blob;
l_dest_offset integer := 1;
l_src_offset integer := 1;
begin
as_sftp.open_connection( i_host => 'localhost' );
as_sftp.login( i_user => 'demo', i_password => 'demo' );
dbms_lob.createtempoorary( l_blob, true );
l_bfile := bfilename( 'MY_DIR', 'test.txt' );
dbms_lob.fileopen( l_bfile, dbms_lob.file_readonly );
dbms_lob.loadblobfromfile
( dest_lob => l_blob
, src_bfile => l_bfile
, amount => dbms_lob.lobmaxsize
, dest_offset => l_dest_offset
, src_offset => l_src_offset
);
as_sftp.put_file( i_path => 'test.txt', i_file => l_blob );
dbms_lob.freetemporary( l_blob );
dbms_lob.fileclose(l_bfile);
as_sftp.close_connection;
end;

from as_sftp.

arintaphon avatar arintaphon commented on July 25, 2024

@antonscheffer Yes, that's the one I try to do so long time ago
Now I use your sample script to put file on sFTP and it's work! But I still can't get file from sFTP to my directory. Can you suggest me more?

from as_sftp.

antonscheffer avatar antonscheffer commented on July 25, 2024

Use google, for instance https://oracle-base.com/articles/9i/export-blob-9i

from as_sftp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.