Transfer file to different server after it get created in DB server

Hi All,
I have a unix shell script that runs in a Linux server and connects to database (using sqlplus of course) and creates a file using UTl_FILE package and which gets created in DB server. We are not actually supposed to create file in DB server as per company rules and regulations. But as a workaround until we find a solution, we are being allowed to create file in DB server then my DBA scp the file to the Linux server. This manual process of transferring the file has to be automated or if possible, it would be best if we can create the file in the target Linux server itself instead of DB server.
Is there any way of doing so or if this issue has been addressed in past, please provide me with the link. I tried to search in forum but couldn't fine one appropriate solution.
Thanks,
Samip

I am trying to find a work around. Instead of file creation, I am going for a PL/SQL process that will directly load into the target table.
I will try to explain my problem as much as possible.
Lets say I have a table A. It's a hierarchy table. X is the parent column while Y is the child one. '1' is the TOPmost in the hierarchy so, value in X corresponding to '1' is NULL.
Table A
X--------Y
----1
1-----     2
1-----     3
2-----     4
2-----     5
2-----     6
3-----     7
3-----     8
4-----     9
4-----     10
5-----     11
5-----     12
7------     13
7-----     14
11----     15
11----     16
I need to transform table A to table B like below:
Table B
L1----     L2----     L3----     L4----     L5
1----     1----     1----     1----     1
1----     2----     2----     2----     2
1----     3----     3----     3----     3
1----     2----     4----     4----     4
1----     2----     5----     5----     5
1----     2----     6----     6----     6
1----     3----     7----     7----     7
1----     3----     8----     8----     8
1----     2----     4----     9----     9
1----     2----     4----     10----     10
1----     2----     5----     11----     11
1----     2----     5----     12----     12
1----     3----     7----     13----     13
1----     3----     7----     14----     14
1----     2----     5----     11----     15
1----     2----     5----     11----     16
Here, each row (value in Y) in table A is processed and are put in correct Level. For example 1 has Level 1 So, it is under L1 and then rest of the columns are filled with 1. 2 has level 2, so it is put under L2 and the it parent is 1 so, 1 in L1 - obvious, then rest of the column filled with 2. Likewise 14 has level 4 so put under L4, then the hierarchy values upward are found and put under respective columns; L5 is entered 14. Basically the hierarchy up is calculated for each value in Y is calculated and put under respective level column in table B and then the rest of the columns are just filled with the column Y value that was processed.
Thanks in advance. Please help me on this write a procedure or any process that will accomplish this task.
Thanks,
Samip
Edited by: 908006 on Apr 15, 2013 1:11 PM
Edited by: 908006 on Apr 15, 2013 1:11 PM
Edited by: 908006 on Apr 15, 2013 1:12 PM
Edited by: 908006 on Apr 15, 2013 1:12 PM
Edited by: 908006 on Apr 15, 2013 1:12 PM
Edited by: 908006 on Apr 15, 2013 1:15 PM
Edited by: 908006 on Apr 15, 2013 1:15 PM
Edited by: 908006 on Apr 15, 2013 1:16 PM

Similar Messages

  • Transfer files from One server(Solaris OS) to another server(Solaris OS)

    Hi,
    I want to Transfer files from One Server(Solaris OS) to another Server(Solaris OS) on private network through ftp and after transferring the files i want to delete these files from first server.
    How can i do that ?
    thanks

    http://commons.apache.org/net/

  • How to transfer file from application server to presentation server in background?

    Hi Experts,
    How to transfer file from application server to presentation server in background?
    Thanks in advance
    Namita

    Thanks Raman and Challa,
    We want to move file from application server to Shared folder, not on local machine. We checked FM which you guys have provided but those are not able to read file from application server.
    We need this program to run in background so that we can use this in daily process chain.
    Appreciate your inputs on this.
    Thanks,
    Namita

  • Read XML file from different server on JSP

    Dear All,
    I am a newbie to JSP with XML, now i want to read the "test.xml" from JSP.
    I read successfully this "test.xml" file from my system and I got output, but I need to read the xml file from
    different server like "http://www.domain.com/test.xml". I couldn't read such a type of file from different server.
    Is it possible to read a xml file from different server?
    If anybody have idea please let me know.
    Thanks in Advance,
    Prasath.
    <%@ page import="java.sql.*,java.io.*,java.util.*,javax.xml.parsers.*,org.w3c.dom.*,org.xml.sax.*" %>
    <%
    try {
        DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
        DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
        Document doc = docBuilder.parse (new File("http://www.domain.com/test.xml"));
        // normalize text representation
        doc.getDocumentElement ().normalize ();
        out.println ("Root element of the doc is " +
             doc.getDocumentElement().getNodeName()+"<br>");
        NodeList listOfPersons = doc.getElementsByTagName("person");
        int totalPersons = listOfPersons.getLength();
        out.println("Total no of people : " + totalPersons+"<br>");
        for(int s=0; s<listOfPersons.getLength() ; s++){
            Node firstPersonNode = listOfPersons.item(s);
            if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){
                Element firstPersonElement = (Element)firstPersonNode;
                NodeList firstNameList = firstPersonElement.getElementsByTagName("first");
                Element firstNameElement = (Element)firstNameList.item(0);
                NodeList textFNList = firstNameElement.getChildNodes();
                out.println("First Name : " +
                       ((Node)textFNList.item(0)).getNodeValue().trim()+"<br>");
                NodeList lastNameList = firstPersonElement.getElementsByTagName("last");
                Element lastNameElement = (Element)lastNameList.item(0);
                NodeList textLNList = lastNameElement.getChildNodes();
                out.println("Last Name : " +
                       ((Node)textLNList.item(0)).getNodeValue().trim()+"<br>");
                NodeList ageList = firstPersonElement.getElementsByTagName("age");
                Element ageElement = (Element)ageList.item(0);
                NodeList textAgeList = ageElement.getChildNodes();
                out.println("Age : " +
                       ((Node)textAgeList.item(0)).getNodeValue().trim()+"<br>");
            }//end of if clause
        }//end of for loop with s var
    }catch (SAXParseException err) {
    out.println ("** Parsing error" + ", line "
         + err.getLineNumber () + ", uri " + err.getSystemId ());
    out.println(" " + err.getMessage ());
    }catch (SAXException e) {
    Exception x = e.getException ();
    ((x == null) ? e : x).printStackTrace ();
    }catch (Throwable t) {
    t.printStackTrace ();
    %>

    You might try:
    Document doc = docBuilder.parse ("http://www.domain.com/test.xml");Alternatively use the java.net package to obtain an Input Stream to the xml document
    InputStream in = methodThatYouWriteYourselfCalledgetInputStreamForURI("http://www.domain.com/test.xml");
    Document doc = docBuilder.parse (in);cheers,
    evnafets

  • I just received an OEM copy of Adobe Photoshop Lightroom 5 with my Canon Pixma Pro 100 Printer.  What exactly is OEM.  Is it a full version?  Can I transfer files between different computers?

    @

    OEM means "Original Equipment Manufacturer", or in your case, Canon (not Adobe) is providing the software. It is identical to what you can buy from Adobe. It is the full version (that's the only version of Lightroom that exists)
    Transfer files between different computers ... this is not a function of Lightroom. Lightroom neither helps nor prevents you from transferring files from one computer to another.

  • Can i transfer file from application server to lotus server.

    hi
    can i transfer file from application server to lotus server.
    i m geting file on application server but i want to transefer that file from application server to lotus server.
    if yes than give me suggestion.
    thanks in advanced.

    Hello Laxman
    If you want to trigger the file transfer from within SAP then you need to execute an <b>external OS command</b> (transaction <b>SM49</b>, <b>SM69</b>).
    At the level of the OS (operating system, e.g. Windows, Linux) you need to be able to transfer files to the Lotus server.
    Your task is, for example, to write a report executing the external OS command which will be executed at the OS level where the file transfer happens.
    Regards
      Uwe

  • Writing the files in different server

    Hello
    I am using oracle8i. I am converting the data into XML files. My company wants to
    keep the converted XML files in different server. I am planning to use UTL file to
    create the files. So UTL FILE would not write in another server. What is the
    best way to solve this issue ?.
    My option is
    1. Create the XML files in Oracle server(using UTL FILE).
    2. Write the batch script to move the files to another server.(can you give me a sample script for writing the batch file ?)
    Is there any other alternate way to solve this problem ?.
    I would appreicate if you could give me any other simplest way.
    Thanks
    Govind

    Can i specify the remote file path in UTL_FILE_DIR(parameter files)... Please clarify .
    Govind

  • Import XML files from different server

    Hi All,
    We have successfully used JavaScript to import local XML files and generated the PDF files on InDesign Server CS4.
    Now, we need to import the XML files which are dynamically generated on the other Server. (Data Managemnt Server).
    Wondering what's the best way to do this?
    Can we pass the whole XML file content as a JavaScript Parameter? What about images?
    or Can Javascript Import an external XML file via HTTP, other protocol?
    The worst case I guess is to have a script to upload XML files onto InDesign Server........
    Also, is it possible to return the generated PDF back to Data Management Server (XML file Server)?
    Thanks,
    xin

    Hi ,
    Check the FM : /SAPDMC/LSM_F4_SERVER_FILE.
    Inside this FM , subroutine below exists.The main program for routine is /SAPDMC/LLSMW_AUX_020F02.
    Call this routine from your program. You will get the length in bytes from the field len of table pt_file.
    data:
      begin of gs_file,
        directory(75) type c,              " name of directory.
                                           " (possibly truncated.)
        name(75)    type c,                " name of entry.
                                           " (possibly truncated.)
        type(10)    type c,                " type of entry: directory, file
        *len(8)      type p,                " length in bytes*
        owner(8)    type c,                " owner of the entry
        mtime(6)    type p,                " last modification date,
                                           " seconds since 1970
        mode(9)     type c,                " like "rwx-r-x--x":
                                           " protection mode
        errno(3)    type c,
        errmsg(40)  type c,
        mod_date    type d,
        mod_time(8) type c,                " hh:mm:ss
        subrc like sy-subrc,
    end of gs_file.
    DATA : pt_file LIKE TABLE OF gs_file.
    DATa : p_ok.
      PERFORM /sapdmc/llsmw_aux_020f02(directory_contents_get)
      TABLES   pt_file
                                USING    '/TMP' ""!!! Here is your filepath
                                CHANGING p_ok

  • Is there any way to create backing bean, After page gets created?

    Hi
    Any one can please answer to my quick question !!!
    Is there any way to create the backing bean ,after a jsf page gets created using ADF ..?
    When i first time created the jsf jppx page i unchecked the option to generate backing bean, but later some time I would like to have backing bean for the newly created page. so is there any way to create backing bean ...?
    Thanks in Advance

    Have your page in the visual design mode then go to the Design->Page Properties menu and you'll be able to select auto-bind on the second tab.

  • How to transfer file from sap server to PDM server using open FT??

    Hello Sap Guru's
    I want to Trasfer a file with all supplier information from SAP server to PDM server(Thirdparty) system Using Open FT ..How can I transfer ???
    Please let me know the answer??
    Thanks In Advance
    Preethi

    Hi Preethi,
    I think it is not possible to transfer a file from SAP to PDM using open FT.
    Using RFCs, we can do the transfer.
    Other option is the file can be downloaded into UNIX. And from there using a shellscript we can transfer the file from UNIX to PDM or if your PDM has the option to grab the file from UNIX that will also work.
    Hope this helps.
    Please reward if helpful.
    Thanks,
    Srinivas

  • Transfer file in application server to another file

    Hello guys I have another major hurdle I am encountering for a little task I am doing.
    I need to send a downloaded file within the SAP application server to another file automatically using ABAP via Background Processing(most preferable a directory in the <b>newtwork</b>).
    What I need to do is, after saving a list from an abap report and saves in the application server (which I have already done), I need it to transport to a the web server. All done in background.
    I really appreciate the help you guys have given to me thus far. Thank you guys and take care.

    Hi
    U have to use unix command for same
    i have seen some function module just check it out
    SXPG_CALL_SYSTEM you can check the user's authorization for the specified command and run the command. The command runs on the host system on which the function module is executed. The function module is RFC capable. It can therefore be run on the host system at which a user happens to be active or on another designated host system at which an R/3 server is active.
    <b>SXPG_COMMAND_CHECK</b> Check whether the user is authorized to execute the specified command on the target host system with the specified arguments.
    <b>SXPG_COMMAND_DEFINITION_GET</b> Read the definition of a single external OS command from the R/3 System's database.
    <b>
    SXPG_COMMAND_EXECUTE</b> Check a user's authorization to use a command, as in SXPG_COMMAND_CHECK. If the authorization check is successful, then execute the command on the target host system.
    <b>SXPG_COMMAND_LIST_GET</b> Select a list of external OS command definitions.
    <b>RZL_READ_DIR_LOCAL</b> Read a directory on the Application Server
    <b>SUBST_GET_FILE_LIST</b> Return table with file list for the given directory (pattern allowed)
    regards
    vinod

  • 'Open with'/'Always open with' file settings not saved after Mac get's shut down.

    Every time I restart the computer, I have to re-change the 'open with' settings to files. How do you get the Mac to remember the settings after the computer is shut down. It used to not have this problem.

    /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchSe rvices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
    on Terminal does nothing.

  • Moving SharePoint back up files to different server

    hi friends
    i have back up file (.bak) of SharePoint 2013 web application. i want to restore this .bak file to another SharePoint 2013 server.
    is it possible ?

    Hi
    you can
    check this details
    http://technet.microsoft.com/en-us/library/ee428314%28v=office.15%29.aspx
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • How to transfer files from different collections in iBooks?

    Hey Everyone!
    As a rep on the road I use my iPad quite a bit with my customers. When I receive pdf files I like to be able to save them in iBooks so that I can show them to my customers at any time. Organizing them seems to be a little difficult in iBooks though. A pdf will open up automatically in the pdf section in iBooks, but when I try to create a new collection in iBooks I can't seem to be able to transfer a pdf into that new collection that I create. Should I be able to do this?
    THanks for your help everyone!

    I think that pdfs are themselved a collection, and i books is not going to let you subdivide it further.  You might try some other system for organizing the pdfs such as docstogo or dropbox, or file browser or goodreader  I think those will let you store the pdfs in whatever file structure you want.  You would be viewing those pdfs from their reader, and not ibooks.

  • Is there an app to transfer files to ipad directly from pc and create folders which would work offline

    Hi,
    My itunes store is not working and I tried my best to fix it but it didn't work. Is there a way I can transfer documents, pdf, work, power point,.wav, mp3 files to my ipad just by connecting ipad to my pc usb port. Also, I have the wifi version, So I need the files to open up when there is no internet. Is there such an app. I tried fileapp-didn't work. And dropbox-its doesn't open documents when I have no internet connection. Please help me out.
    thank you

    There are a number of iTunes alternatives for both Macs and PCs;
    iTunes alternatives
    http://www.wideanglesoftware.com/touchcopy/index.php
    http://www.ecamm.com/mac/phoneview/
    http://www.copytrans.net/
    You need to look into using your Dropbox account more. You have to actually download the files onto your device instead of leaving it in the cloud. DB is capable of doing that.

Maybe you are looking for

  • Can I stop iTunes from downloading the SD version when I purchase HD Video?

    When I order the HD versions of a program, my computer shows both a standard and HD version on the Downloads list, and tries to download both of them. Also, shows that I have deleted keep re-appearing and trying to re-download whenever I launch iTune

  • Total mac noob needs a little help!

    Hi everyone, Just got an imac and just a few things are bugging me, i installed firefox and msn messeger, and underneath my Mac HD icon, there are white disk box thingys that wont go away, why is this? is it because the programs havent been installed

  • Can I open a photo book created in Aperture 3 in iPhoto?

    HI I have created a photo book using Aperture 3 of a recent overseas tour. I want to send it to all the tour group so that they can print or buy their own copy. Not everyone has Aperture but all will have iPhoto... I have saved the book as a separate

  • My iPad is stuck on the white apple.

    My iPad is stuck on the white apple.  I have tried holding down the power and home keys until it shuts down and continue to hold them down, but then I get a low battery symbol and it won't do anything else.  I tried plugging it into the computer and

  • Mouse dragged event with unexpected coordinates

    I am dragging the mouse on a half circle from the middle left to the top middle. This results in mouse events with the coordinates form (10,90) ->(100,10) Letting the mouse go and then dragging it further to the left, the coordinates in the of the ev