Can not delete .sqb files created with Nowrite option.

meklemblmeklembl Posts: 107 Bronze 2
edited October 25, 2007 2:39AM in SQL Backup Previous Versions
I was running some timing tests to optimize the speed of SQL Backup. When I finished I was going back to 'cleanup' the files. The actual backups that were created could be deleted, but I have about 10 files that are 1KB in size that were created with the NoWrite option. When I go to delete those files I get a window that says, "Cannot delete DataWarehouse_db_20071023_133309.sqb: It is being used by another person of program. Close any programs that might be using the file and try again."

Larry Meklemburg
Cleveland, OH
Larry M
Cleveland, OH USA

Comments

  • meklemblmeklembl Posts: 107 Bronze 2
    From Query Analyzer on the server where the database resides I ran;

    EXECUTE master..sqlbackup N'-SQL "BACKUP DATABASE [DataWarehouse] TO DISK = ''\\Themis\DataBackups2\Dev-DB\<AUTO>.sqb''WITH COMPRESSION = 1, NOWRITE, THREADCOUNT = 2"'

    This created a file named DataWarehouse_db_20071024_134554.sqb.

    I can not delete that file.
    Larry M
    Cleveland, OH USA
  • meklemblmeklembl Posts: 107 Bronze 2
    I remoted into the server and I ran the aforementioned process from Query Analyzer on the server to get accurate timings. I closed all sessions and such from the server and logged off.

    To fix the problem I remoted back into the server and restarted the SQL Backup Agent. After doing that I was able to delete the files.
    Larry M
    Cleveland, OH USA
  • peteypetey Posts: 2,358 New member
    Thank you for reporting a bug. When running a backup using the NOWRITE and NOCOMPRESSWRITE options, a file should not have been generated. This currently occurs when the above options are used together with the THREADCOUNT option.

    Presently, the workaround is as you described: restart the SQL Backup Agent service, and delete the files.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
Sign In or Register to comment.