SFTP through PL/SQL

I have detailed my requirement below and please assist me here.
I need to copy .CSV File from a Windows Server shared path (\\hostname\output) to another server which is on unix.
I will have to use SFTP and not FTP.

Hi,
I'm sure its probably possible using some clever plsql (or c/java) to do this directly from within the database. However it may be easier to just write a batch script which calls an scp/sftp command and transfers the file. This script can easily be called by DBMS_SCHEDULER. winscp is an sftp client but I'm not sure if there is a command line version of it? if not there are plenty of other command line sftp clients - putty (psftp) for example.
Regards,
Harry

Similar Messages

  • SFTP in PL/SQL

    anyone know how to transfer files via SFTP in PL/SQL? Im currently using the UTL_TCP package in oracle to do regular FTP transmissions, but I was told that package doesnt do SFTP. I'm also open to any java classes out there as well, but all I can find so far are ftp-server side java apps.
    The server im transferring from isnt a FTP server... just need to transmit and recieve files securely. Anyone know a solution? Let me know. Thanks!
    Mo

    You'll want to go through the Java stored procedures Developer's Guide which talks about things like using the LoadJava utility and creating PL/SQL wrappers around Java classes.
    The term "SFTP" is used (often incorrectly) to refer to any of
    - SSH file transfer protocol (which is what you seem to be describing and is the correct use of the term)
    - FTP over SSH
    - FTPS (or FTP/SSL) which is FTP with SSL encryption
    http://en.wikipedia.org/wiki/Sftp
    Assuming you're using "SFTP" in the most common & correct form, it sounds like you're on the right track.
    Justin

  • Calling Report Through PL/SQL

    Hi All,
    Is it possible to call a report through PL/SQL?If yes, please help me in this regard.
    Thanks.
    Vinay Kumar Garg

    Hi,
    There are 4 ways to call a report.
    Check out the following:
    http://oracleapps4u.blogspot.com/2011/03/oracle-report-request-methods.html

  • Report through Pl/Sql

    hi,
    i need to generate a report through pl/sql without using the concept of spool...
    please suggest some ideas
    thanks in advance
    Lovely

    UTL_FILE Demos
    http://psoug.org/reference/utl_file.html
    Etbin's link also have many useful examples

  • Is it possible to start planning manager programatically from backend through PL/SQL?

    I need to activate and run Planning manager concurrent program from back end through PL/SQL.Actually i am working on MRP Open Forecast Interface and I want to run this program after inserting data in the interface table mrp_forecast_interface.Please guide me.

    Oracle EBS forum is the best place for your question. This place is more towards general SQL, PL/SQL questions.
    https://community.oracle.com/community/oracle-applications/e-business_suite/e-business-suite-technology/general_ebs_discussion

  • Xml file not generated through Pl/sql procedure as a concurrent executable

    Hi,
    I getting error while genarating xml file through Pl/sql procedure as a concurrent executable file.
    Error Message:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Invalid at the top level of the document. Error processing resource

    Hi,
    Make sure the file has the XML header:
    <?xml version="1.0" encoding="UTF-8"?>
    or similar.
    Regards,
    Gareth
    Blog: http://garethroberts.blogspot.com/

  • Submitting XML Publisher Concurrent Program through PL/SQL

    Hi,
    I am trying to submit a XML Publisher concurrent program through PL/SQL API fnd_request.submit_request.
    The request gets fired and completes successfully but it doesn't pick up the default template attached to it. Its output is plain XML but expected output is PDF report.
    However when I submit this report from SRS, it picks up the default template and gives output in PDF.
    Please let me know what could be going wrong?
    Regards,
    Nitin

    Check out the FND_REQUEST.ADD_LAYOUT API. You need to call it before you submit your report.
    Cheers,
    Dave

  • Invoking BPEL Process through pl/sql is failing

    Hi all,
    I am trying to invoke BPEL process through PL/SQL and its throwing following error.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header/><env:Body><env:Fault xmlns="http://xmlns.oracle.com/pcbpel/adapter/file/ReadFile/"><faultcode xmlns="">null:Read_ptt</faultcode><faultstring xmlns="">Cannot figure out operation name. Bad SOAPAction or wsa:Action.</faultstring><faultactor xmlns="">initiate</faultactor></env:Fault></env:Body></env:Envelope>
    Following is code I am using to invoke BPEL PROCESS
    declare
    soap_request varchar2(30000);
    soap_respond varchar2(30000);
    http_req utl_http.req;
    http_resp utl_http.resp;
    begin
    soap_request:='<?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header/>
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/ReadFile/">
    --<ns1:Read_plt><ns1:input>leeg</ns1:input></ns1:Read_plt>
    </soap:Body>
    </soap:Envelope>';
    http_req:= sys.utl_http.begin_request('http://localhost/orabpel/default/BPELProcess1/v2007_12_03__65618','POST','HTTP/1.1' );
    sys.utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
    sys.utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
    sys.utl_http.set_header(http_req, 'SOAPAction', 'initiate');
    sys.utl_http.write_text(http_req, soap_request) ;
    http_resp:= sys.utl_http.get_response(http_req) ;
    sys.utl_http.read_text(http_resp, soap_respond) ;
    sys.utl_http.end_response(http_resp) ;
    dbms_output.put_line(soap_respond);
    end;
    Any help would be appriciated.
    Thanks,
    Vipul

    Hi,
    Switching on or off a bpel is an admin job.
    u can stop an application but not one bpel.
    I doubt if there is any way to do it programatically.
    Let us get other opinons
    Regards

  • How to transfer the files from one server to another through pl/sql...?

    I want to transfer all the files from source server with respective directory to designation server with respective directory (designation server - oracle reside server).
    Is it possible to ftp from one server to another server(designation server - oracle reside server) through pl/sql. these two servers are independent & unix server.

    No ... The package mentioned in
    http://www.oracle-base.com/dba/miscellaneous/ftp.pks
    this works for across the server i.e. transfer the files from one server to other (it is basically ftp) ..
    So it is NOT correct that this code transfer the file between two location & with in server..

  • Print my input which i accept in my procedure in Excel Sheet through pl/sql

    Respected Sir,
    If i want to print my input in excel sheet which i took as a input parameter for my procedure
    for example my procedure:
    create or replace procedure create_csv('hello this is wonder world').
    I want to print hello this is wonder world in excel sheet.
    How can i acheive this through pl/sql procedure. with out utl_file predefined package.
    Please help me regarding this.
    Sincerely,
    Chandrasekhar B.S.

    maybe this link accessing oracle via access and excel might be of some help.

  • Send mails with csv file as an attachment through oracle(SQL SCripts / Stor

    Hello Everybody,
    I have recently come across a requirement in which I am supposed to send mails with csv file as an attachment through oracle(SQL SCripts / Stored Procedure) .
    The contents of the csv file are to be retreived from the Database as well as the content of the mail and to whom it needs to be sent has also to be picked up from the database.
    Can somebody suggest me with a suitable code for the same?
    Would be of great help..!!
    Thanks & Regards,
    - VR
    Edited by: user646716 on Dec 18, 2009 10:44 AM

    read below links
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:255615160805
    http://www.orafaq.com/wiki/Send_mail_from_PL/SQL#Send_mail_with_UTL_TCP_-withattachments
    How to send csv file as an attachment

  • SFTP through command line

    After surfing on web and reading the forums I come to know that there is no free API available for SFTP.
    I just want to know as alternative can we sftp through command prompt so that I can develop batch file and call it through java program.
    Or It would be great if someone know the free API to do SFTP.
    Thanks in advance!

    I think you will find there is an open source version available at Sourceforge. Or so mr google just told me. ;-)
    SFTP

  • How to import *.dmp file Through Oracle SQL Developer (3.2.20.09)

    hi
    how to import *.dmp file Through Oracle SQL Developer (3.2.20.09) ?
    how to do it ?
    thanks

    You do not.
    .dmp files are created from our Export and Data Pump database utilities and are proprietary files. You use the corresponding Import (or Data Pump) utility to import the data.

  • To fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL

    Hi Experts,
    My basis team wants me to write a OPEN sql statement in DB2 . T
    The Open SQL statement for reading data from database tables is:
    SELECT      <result>
      INTO      <target>
      FROM      <source>
      [WHERE    <condition>]
      [GROUP BY <fields>]
      [HAVING   <cond>]
      [ORDER BY <fields>].
    I want to fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL in report RSORADJV  in PI .
    As per PI basis comment : To use u201CRSORADJVu201D you need write the code in open SQL. If the code had been written in open SQL in the first place you wouldnu2019t be having to translate this from MS SQL.
    Can you pls help in writing open sql with above syntax .
    Initially when I wrote as
    QL statement : select * from SAPDBSR3.XI_AF_MSG, I got the error messege as
    Error : insufficient priviliage to access specified  table.
    Again basis suggested to write this code in OPen SQL statement .
    Please suggest., I dont know open SQL for the same.
    Regards,
    Arnab.

    Hi,
    Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
    Kr,
    Manu.

  • How i can load excel sheet into a table in oracle through pl/sql procedure

    Hi,
    How i can load excel sheet into a table in oracle through pl/sql procedure or a pl/sql block. Excel sheet is saved on my c or d drive on my machine. In xls format.

    Depending on how big your spreadsheet is and how frequently you want to do this you might want to contruct insert statements in excel, then run these. I have done this to load a few hundred rows for a one off test on dev.
    e.g. if you have values 1 and 'a' in you spread sheet and want to insert them in to table xxx col1 & 2:
    | /|   A   |   B   |    C
    |1 |col1   |col2   |
    |2 |      1|a      |="insert into xxx ("&$A$1&","&B1&") values ("&A2&",'"&B2&"');"then paste the contents of colum C
    insert into xxx (col1,col2) values (1,'a');into sqlplus or a script.

Maybe you are looking for

  • Acknowledment No not appearing in FORM16 Output

    Hi, I am generating FORM 16 (TCode : PC00_M40_F16) and acknowledgement no is not appearing even though the data is maintained in PE03 by functional consultant. When i debugged the program i found in Include  PCF16IN7 i came across            RP-REF-C

  • Invoke-Command and $using:ACL problem

    Hi, Can anyone point me in the right direction. I want to modify and ACL on a remote server, but i cannot assign a variable inside the invoke-command where i'm also refferencing an local variable. When the first invoke-command is ran i get an error:

  • Need one query

    Hi All, I have one table product_data it has 3 columns Parent_code , Child Code, Level. Please refer follwing dataset Parent_code   child_code  Level A12                B12            1 B12                C12             2 C12                D12     

  • Java 2d to read a text file containing vrml

    Hi I was wondering if anyone could tell me how I can get have 2d to read a text file such as one in vrml. How would I go about doing this as right now i have 2 files which i want to integrate, a 2d plan and a vrml correspondant. Thanks in advance

  • Kernel panic - almost for sure after kernel update

    I recall making some update yesterday that included some package involving something related with the lernel. Today, i cannot boot my system, and it freezes with a kernel panic message. The last lines says something like this: /init: export: line 52: