-
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?
-
Call a stored procedure on the server where you want to write the file. Use the UTL_FILE function to write out the file.
-
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.
-
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.
-
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.
-
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.
-
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.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|