DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Connection to non oracle server and writing a file there

  1. #1
    Join Date
    Oct 2005
    Posts
    5

    Connection to non oracle server and writing a file there

    Hi,

    I need to connect to two non oracle servers from DB function and write there file. These servers are different ast the one where DB is located. Is this possible? if yes, how?

  2. #2
    Join Date
    Nov 2001
    Location
    UK
    Posts
    152
    Call a stored procedure on the server where you want to write the file. Use the UTL_FILE function to write out the file.

  3. #3
    Join Date
    Oct 2005
    Posts
    5
    The directory and server is not listed in init.ora and we don't want to change it. Is there some other way how to easily connect to a different server? Thanx.

  4. #4
    Join Date
    May 2005
    Posts
    10
    Tom Kyte describes three different methods of connecting to non Oracle DBs here :
    http://asktom.oracle.com/pls/ask/f?p...:4743719073967

    Hope this helps.

  5. #5
    Join Date
    Oct 2005
    Posts
    5

    sorry,

    this is good, but i am thinking about non db system - that means, while running a sql function in oracle DB i need to connect to some host (server on network), get into specific directory, write there a file, close it and continue in the transaction - all of this should be done in sql function. It's my mistake, that i did'd explain it clearly. Is this possible? If yes, how? Thanks in advance.

  6. #6
    Join Date
    Feb 2005
    Posts
    158
    Oracle can only write to a file on a directory accessible from the server running the Oracle instance. Either set up a shared location that you can get to from both (all) appropriate machines, or set up an FTP job (eg cron in unix) to move files from one machine to another.

  7. #7
    Join Date
    May 2005
    Posts
    10
    Another option will be to call an external procedure or JAVA stored procedure that can run OS command. Use something like rsh/ssh to create a file on the remote box in the procedure.The external procedure or Java stored proc can be run from Oracle as SQL command.

  8. #8
    Join Date
    Oct 2005
    Posts
    5

    Thanks

    I thought, that it is not possible in oracle (also get such an answer from db admins) but anyway, i wanted to know, if there really isn't some way. The problem is, that i did in unuix shell, but i was asked to remove it and keep it just as sql functionality. Unfortunately, we should live with unix or think of some hybrid solution. ;-) Thank you for answer. Have a nice day.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width