-
Archive log question
Hi,
I have a question on Archive logs. I am compressing the archive logs with a cron job. What will happen if arch process has just started to create a new file and the compress cron job start compressing it.
As the arch file being written has compressed, will the oracle write to a different arch file or will it hang and fail.
Badrinath
There is always a better way to do the things.
-
Not quite the answer to your question:
Had the same prob under NT - pkzip created an unusable zip file (Oracle did not hang). Worked around it by moving the file to another directory before zipping. The move failed with a sharing violation if the file was still being written and the zip job found nothing new to do - so no zip file (get it in the next cycle) instead of a "corrupted" one.
I hope you can translate that to UNIX.
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
-
Hi,
The unix systems don't lock the files as the windows does. I allows to delete the file while it's in use!!
There is always a better way to do the things.
-
Sorry, didn't know that - I'm no UNIX expert.
So one up to Bill Gates, eh?
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
-
Use a script for cron that has to check date when a archile log was created.
-
Hi Thanks,
I am tring to understand what will happen in that scenario. I already have the script which will compress all the files except the recent ones.
But in theory, what should happen if the arch process is writing and that arch file is deleted.
Badrinath
There is always a better way to do the things.
-
Re: Archive log question
[QUOTE]Originally posted by badrinathn
Hi,
I have a question on Archive logs. I am compressing the archive logs with a cron job. What will happen if arch process has just started to create a new file and the compress cron job start compressing it.
As the arch file being written has compressed, will the oracle write to a different arch file or will it hang and fail.
Badrinath [/QUOTE
Neither might happen.Unix will not remove the existing file (unzipped) until it zips 100% of the file. So, I guess oracle keeps writing the file and zipping process might get failed, but not archiving process of oracle. You can test it and go with it ELSE under benefit of doubt, Do not let your zipping process start instantly, give time atleast for 10 logs to be archived before your script capture logs for zipping.
Reddy,Sam
-
Hi Sam,
Very convincing answer. I think that really make sence now!!
Just another thing!! What if the file is deleted or moved while the arch is still writing to a file.
Badrinath
There is always a better way to do the things.
-
Originally posted by badrinathn
Hi Sam,
Very convincing answer. I think that really make sence now!!
Just another thing!! What if the file is deleted or moved while the arch is still writing to a file.
Badrinath
It creates the file with less contents(say there is log of 100 MB, you deleted after archiving 50MB, you do get log but, only 50MB)You get incomplete file which can't be used for recovery most probably... forgot there is specific error it says incomplete file for recovery.
Reddy,Sam
-
Excellent, Thank you very much!!
There is always a better way to do the things.
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
|