Errors 3041 and 3158 in BACKUP and RESTORE processes.

  • Hello.

    We are running SQL 2000 sp3a on Windows Server 2003 Standard v5.2 with all latest service packs.

    I wrote an applet in VB .NET to update certain columns in one table of our database. That update is done at the time of converting one of our locations to a database based version of our proprietary software. The update runs fine. After the update, the same applet provides for a backup by calling a SQL statement. The backup processes for a time and then returns:

    3041 :

    BACKUP failed to complete the command BACKUP DATABASE CEDNet TO DISK = 'D:\Program Files\Microsoft SQL Server\MSSQL\Backup\ProductionReady.BAK' WITH INIT

    The message is identical in Event View and SQL error logs.

    BOL states that a second error message will provide the true condition that causes the backup failure. There are no other error messages anywhere in Event Viewer or SQL Error logs.

    The drive has several times the required space available, so it is not a disk space issue.

    A copy and paste of the same SQL statement into Query Analyzer yielded the same result.

    If I modify the SQL stmt in QA or in the applet to target a different db....no failure.

    At the time of these failures we had run repeated test conversions on the box in question. (The database is approx 1.3 GB in size.) The transaction log had grown to about 6 GB.

    Now for the twist.....At the request of a developer, I shrunk the database to prepare for another test conversion overnight.  After the shrink, I started re-running queries to verify my facts for this post and to copy and paste errors. Well, the darn thing ran without error.

    So, I thought I had the problem licked.  However, the next day the following happened:

    Log was 2.5 GB; entire db approx 3.9 GB this morning after conversion.

    The HDD had 20 GB free. I tried the backup from my applet.....error 3041 as stated above.....no other errors.

    I tried it a second time.....same.

    I did a backup using Enterprise Manager. Completed with no errors.

    I tried the applet backup....same error....no other errors.

    I shrunk the database.

    I tried the applet backup....same error....no other errors.

    I backed up using Query Analyzer. Complete with no errors. (connection using same sql authentication as applet)

    Renamed the backup file. (to force a "fresh" backup file.)

    I tried the applet backup....same error....no other errors.

    The connection string used in the applet: user id=Id;password=IdPw;data source="10.96.36.249";persist security info=False;initial catalog=dbname

    Id is currently SysAdmin (I had incrementally elevated permissions trying to rule out permissions...if I ever figure this out sysadmin will be removed).....also....as Query Analyzer bu worked with same credentials, I don't think it is permissions.

    Finally, I tried the RESTORE process that I built into the applet.  That process returned an error of 3158.....the paths are correct and I have watched the mdf and ldf files appear in Windows explorer before the restore fails.  After the fail, the ldf and mdf are both deleted. 

    Has anyone else scene this behavior?

    Any and all input is appreciated.

    And, in the spirit of Peace to ALL of ALL faiths, Merry Christmas and Happy New Year.

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply