Operating System - HP-UX
1752335 Members
5582 Online
108786 Solutions
New Discussion юеВ

Re: Oracle Archive Logs - Redirection

 
SOLVED
Go to solution
Scott Buckingham
Regular Advisor

Oracle Archive Logs - Redirection

I would like to redirect the output for our archive logs to go from one filesystem to another (the new FS has three times the space). Is this something that can be done "on-the-fly" or does Oracle need to be shutdown? Right now, we are using a symbolic link for this (to avoid a bad disk in the system) and I wouldn't mind continuing to do this, just to a new location.
Long time dabbler, first time Admin / DBA
6 REPLIES 6
Dave Chamberlin
Trusted Contributor
Solution

Re: Oracle Archive Logs - Redirection

You should be able to according to Metalink:
The parameter ARCHIVE_LOG_DEST sets the destination for archived log files.
To override the destination that this parameter specifies, either specify a different destination for manual archiving or use the SQL*Plus:
statement ARCHIVE LOG START filespec
for automatic archiving, where filespec is the new archive destination. To permanently change the destination, use the statement ALTER SYSTEM SET LOG_ARCHIVE_DEST = filespec, where filespec is the new archive
destination.
Andreas D. Skjervold
Honored Contributor

Re: Oracle Archive Logs - Redirection

Hi

The cleanest way is to update init.ora parameter LOG_ARCHIVE_DEST to the new filesystem, and restart the database.

If this is not an option, I belive Dave is right on the spot, just remeber to update the init.ora parameter anyway, or you'll end up on your old location the next time the database restarts.

If you prefer to use the link method for some reason, just delete the link and recreate it to the new archive directory.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Andreas D. Skjervold
Honored Contributor

Re: Oracle Archive Logs - Redirection

Felt I wasn't clear:

First:
SVRMGR> alter system set log_archive_dest='newdir';

Then:
update init.ora
LOG_ARCHIVE_DEST='newdir'

to make the change permanent.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Scott Buckingham
Regular Advisor

Re: Oracle Archive Logs - Redirection

Thank you for your responses, Dave and Andreas. It sounded simple enough, but of course, I didn't do something right. I had intentions of doing it the right way and letting Oracle drive the archive destinations instead of using a symbolic link. Therefore, I removed the link, then tried the 'alter system' method mentioned. All I got was grief! First, I shutdown the Oracle instance, tried the alter system statement and received an error (sorry, I didn't write it down). Since this is the production instance, I thought I would just start the database back up and worry about logging later. To make a long story short, I ended up changing the log_archive_dest value in the .ora file, but I still couldn't restart the database because it could not find the device/directory that I wanted the logs to go to. I commented out the log_archive_dest line and was able to start the database, without logging. I'm still missing a piece, but I'm not sure what it is. Any suggestions?
Long time dabbler, first time Admin / DBA
Dave Chamberlin
Trusted Contributor

Re: Oracle Archive Logs - Redirection

The errors you received will still be in the alert log in $ORACLE_BASE/admin//bdump/alert_.log . It may be useful to post the relevant section of that file. I would make sure that the oracle user has r/w permission in the destination directory, by having the oracle user create a file there. You may need to do an ALTER SYSTEM ARCHIVE LOG STOP, then set the new dest dir, then ALTER SYSTEM ARCHIVE LOG START. You can also try to archive a single log with: ALTER SYSTEM ARCHIVE LOG '' TO ''.
Scott Buckingham
Regular Advisor

Re: Oracle Archive Logs - Redirection

Hi Dave, again, thanks for your response. Can these ALTER commands be run while the DB is running? This is for our production database so I don't want to affect the work of others.
Long time dabbler, first time Admin / DBA