logs from backup cannot be deleted in Windows - "Close any programs that maybe using this file"
I have a parent script named HOT_BACKUP.bat that calls bpbackup.
I on purpose cancel the Job via the Activity Monitor to see if it sends the error log and it does send it.
But when I try to erase the log CMDB_17_Hotback.03-21-2010.log this message appears:
Cannot delete CMDB_17_Hotback.03-21-2010.log: It is being used by another person or program.
Close any program that may be using the file and try again.
Script HOT_BACKUP.bat :
set newDate=%date:~4,2%-%date:~7,2%-%date:~10%
set arg=CMDB
C:
cd C:\Program Files\Veritas\NetBackup\bin
start bpbackup -p Windows-Servers-dbs -s %arg% -w -L C:\oracle\Dba\logs\CMDB\hot_backup_logs\%arg%_17_Hotback.%newDate%.log -f C:\oracle\Dba\scripts\CMDB\hot_backup_scripts\%arg%list.txt
----------------------------------------------------------------------------------------------------------------
bpstart - calls hot_CMDB_backup.bat:
set newDate=%date:~4,2%-%date:~7,2%-%date:~10%
set arg=CMDB
SET ORACLE_SID=CMDB
start C:\oracle\Dba\scripts\CMDB\hot_backup_scripts\hot_CMDB_backup.bat
-----------------------------------------------------------------------------------------------------------------
bpend - calls hot_CMDB_backup_end.bat
set newDate=%date:~4,2%-%date:~7,2%-%date:~10%
set arg=CMDB
SET ORACLE_SID=CMDB
start C:\oracle\Dba\scripts\CMDB\hot_backup_scripts\hot_CMDB_backup_end.bat
-----------------------------------------------------------------------------------------------------------------
The hot_CMDB_backup_end.bat has the following entries at the end in order to find errors and send the log, which is doing ok:
type "C:\oracle\Dba\logs\CMDB\hot_backup_logs\%arg%_17_Hotback.%newDate%.log" > "C:\oracle\Dba\logs\CMDB\hot_backup_logs\test.log"
findstr /C:"status = 0" C:\oracle\Dba\logs\CMDB\hot_backup_logs\test.log
if %errorlevel% neq 0 cscript C:\oracle\Dba\scripts\CMDB\hot_backup_scripts\sent_veritas_log.vbs
------------------------------------------------------------------------------------------------------------------
The sent_veritas_log.vbs is sending test.log. This is being done ok.
What I want to know is why bpbackup is taking control of the log after it finishes.
Comments
Is bpbackup still showing in
Is bpbackup still showing in Windows Task Manager? If not, there's probably something else holding on to the log. Download a utility called 'handle' from Sysinternals to see what's holding on. Another handy utility from Sysinternals is Process Explorer.
Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows.
Handy NBU links
Thank you. I downloaded
Thank you.
I downloaded Handle, I downloaded Process from sysinternals but Process says that it has insufficient resources - The Windows 2003 server has 10 gb of Ram and the /3GB and /PAE has been enabled in the boot.ini.
About the Handle, I issue this command handle <Log path>\<log name> and it just stays there opened but I can't see any output.
I'am entering the Server as the oracle user. System Admin included oracle as an Administrator.
I'am seeing this when in the task manager I check "show all process":
bpjava-msvc.exe from the SYSTEM user
bpinetd.exe from the SYSTEM user.
I 'am seeing 65 cmd.exe from the SYSTEM user.
So I'am still wondering what is happening and how to correct it.
Would you like to reply?
Login or Register to post your comment.