tags:

views:

2121

answers:

3

I'm using DBD::Oracle in perl, and whenever a connection fails, the client generates a sqlnet.log file with error details.

The thing is, I already have the error trapped by perl, and in my own log file. I really don't need this extra information.

So, is there a flag or environment for stopping the creation of sqlnet.log?

Thanks

+3  A: 

Are your clients on Windows, or *nix? If in *nix, you can set LOG_DIRECTORY_CLIENT=/dev/null in your sqlnet.ora file. Not sure if you can do much for a windows client.

EDIT: Doesn't look like it's possible in Windows. The best you could do would be to set the sqlnet.ora parameter above to a fixed location and create a scheduled task to delete the file as desired.

Okay, as Thomas points out there is a null device on windows, use the same paradigm.

DCookie
+3  A: 

As the Oracle Documentation states: To ensure that all errors are recorded, logging cannot be disabled on clients or Names Servers.

You can follow the suggestion of DCookie and use the /dev/null as the log directory. You can use NUL: on windows machines.

Thomas Jones-Low
+1 for the NUL device on windows pointer
DCookie
+1  A: 

From the metalink

The logging is automatic, there is no way to turn logging off, but since you are on Unix server, you can redirect the log file to a null device, thus eliminating the problem of disk space consumption.

In the SQLNET.ORA file, set LOG_DIRECTORY_CLIENT and LOG_DIRECTORY_SERVER equal to a null device.

For example:
LOG_DIRECTORY_CLIENT = /dev/null
LOG_FILE_CLIENT = /dev/null

in SQLNET.ORA suppresses client logging completely.


To disable the listener from logging, set this parameter in the LISTENER.ORA file:
logging_listener = off