Linux process exit

friends when I call to a procedure where DBMS_OUTPUT.PUT_LINE bd are having the procedure?

Rephrase, please? I don't think that translated.

1 Like

I need to know where are the
DBMS_OUTPUT.PUT_LINE ('Open successful');

when I call a pkgs from a shell

That depends on what's running it and whether any redirection was involved. It could end up in a terminal, get saved to a log file, or be discarded completely.

1 Like

Oracle DBMS_OUTPUT checks to see if stdout (if it exists) is a tty (or a redirected file) on the controlling process. If there is none, nothing is written, anywhere.

This is because of the operational model of oracle processes in UNIX. One process executes the code, another process is forked from the starting one to connect() to oracle. That second process talks via sockets to a third unique process on the DBMS phyiscal server. There is no way for the server when and if it executes to know what is going on on the other side - the original process that made the connection.

This model holds with minor changes no matter where the original process runs.
Answer:

1. make sure you understand the location of writable directories on the DBMS server box
that  the DBA has created.  These directory objects can be seen to exist in the view ALL_DIRECTORIES
2. call UTL_FILE - open method for a file in the allowed directory, then: printf method, close method, etc. to write your file.
3. copy it back from the oracle special I/O directory to someplace  useful for your app.
1 Like