Started a new job in an environment much bigger than before, so I need scripting to help.
I have Win2000 server running Oracle, which creates a log file that the DBA would like to read once in a while. We don't want to open the log file for fear that it would then be inaccessible by the app. So, scripting a few commands to copy the log file to a new file came to mind. However, we only want the last 100 lines of the file (like Unix tail -f 100, for example). How can we use the copy script but only grab the last one hundred lines of the current log file? And, I want the file name to be defined using the NOW command instead of replacing the newly created file each time.
Oh yeah, happy Monday to all.
I have Win2000 server running Oracle, which creates a log file that the DBA would like to read once in a while. We don't want to open the log file for fear that it would then be inaccessible by the app. So, scripting a few commands to copy the log file to a new file came to mind. However, we only want the last 100 lines of the file (like Unix tail -f 100, for example). How can we use the copy script but only grab the last one hundred lines of the current log file? And, I want the file name to be defined using the NOW command instead of replacing the newly created file each time.
Oh yeah, happy Monday to all.