Tags:MS, SQL Server 2K, 8.00.2039, Dell 1600 Series RAID running a WMS application, 3041 Backup Failed to Complete the command BACKUP DATABASE[ASCTrac] TO DISK=N'C:\SQL DB BAK\asctrac031808.bak' WITH NOINIT, NOUNLOAD, NAME=N'ASCTrac backup', NOSKIP, STATS=10, NOFORMAT
Our WMS application vendor recently did a backup of the database on 3/18/08 and named the file asctrac031808.bak. When I go into the SQL Ent Mgr and change the name of this file to a different date, and run the backup, I get this error message. Also the new file name is not kept, and reverts back to the 31808.bak. I need some advise on how to set-up daily backups using the Ent.Mgr./All Tasks/Backup Database. I would like to see the DB backed up nightly and the file named with the system date when backup was run. I have full administrative rights to the domain, and the SQL Server.
No, I was trying to do backups from ENT MGR - ALL TASKS - BACKUP DATABASE. I have now setup a Maintenance Plan to run nightly backups. This will start tonight around 11 PM. Is there any value to saving the .BAK file by a date/time stamp each night or just have the latest backup from the previous night?
What is the difference between setting up a Maintenance Plan vs the way I was doing from ALL TASKS - BACKUP Database? Both accept a maintenance schedule. I am new to the SQL Server, and do not understand all the intricacies of the best method to do a complete DB backup together with the TL file. I have also attached a copy of the SQL Error Message. Thanks for your assistance.
MS SQL SERVER 2K 8.00.2039 (X86) is the version. The DB is about 5 GB. From the maintenance schedule that I set up last Friday night, the backups ran fine over the weekend. But this morning when I ran the DBCC SQLPERF(LOGSPASCE), the size fo the Transaction Log File was 30342 MB and 99% of the space used. On Friday these stats were 1043MB and 19% used space. What would have caused the TL file to increase 30 fold? We do not process any transactions over the weekend. Is it necessary to do a DBCC SHRINKFILE on a periodic basis? Please advise.
Thanks a lot. I will follow your suggestion and do a TL Backup every night after the DB backup is completed. Will let you know if this solves my problem.
I have one more question please. When I looked at the error logs from last nights backup, I found the following message: Microsoft (R) SQLMaint Utility (Unicode), Version Logged on to SQL Server 'ATLSRV04' as 'NT AUTHORITY\SYSTEM' (trusted) Starting maintenance plan 'DB Maintenance Plan1' on 3/31/2008 1:00:03 AM [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 5070: [Microsoft][ODBC SQL Server Driver][SQL Server]Database state cannot be changed while other users are using the database 'ASCTrac' [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER DATABASE statement failed. [Microsoft][ODBC SQL Server Driver][SQL Server]sp_dboption command failed. [1] Database ASCTrac: Check Data and Index Linkage... [Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 7919: [Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode.
The following errors were found:
[Microsoft][ODBC SQL Server Driver][SQL Server]Repair statement not processed. Database needs to be in single user mode. ** Execution Time: 0 hrs, 0 mins, 1 secs **
Deleting old text reports... 0 file(s) deleted.
End of maintenance plan 'DB Maintenance Plan1' on 3/31/2008 2:15:27 AM SQLMAINT.EXE Process Exit Code: 1 (Failed)
How do I log in in the "Single User Mode"? Normally at nights no users are logged on to this application.
Looks like you are trying to do a DBCC CHECKDB with repair method. Edit your command and erase the repair part. You won't need it. You would need it if you have some kind of problem in DB.
Thanks a lot for all your help. I am unable to do Transaction Log backups, because I am not logged in "Single User Mode". I tried to run the SQLSERVR.exe -c -m but that did not work. Can somone show me how to log to SQL Sevrver in Single User Mode, and after completing the TL backups put it back in the regular production mode.
I set up the Maintenance Plan to do TL backups and DB backups. Both ran OK last night. But this morining when I did a DBCC SQLPERF(LOGSPACE) I found that the size of the log was 10GB up from 1 GB yesterday and occupied 99% of space. Is there a reason why it grew to such a large size. Do I have to run the DBCC SHRINKFILE every day. How do I handle this on a daily basis. Thanks for all the help.
You might have some job running after backups. Maybe REINDEX job (optimization in Maintenance Plan) or some kind of big data process (Import, Purge, ...). I'll sugest you to have a different schedule for transaction log backups. Something like backing up TL in each 6 hours (so will be 4 times by day).
When I run the DBCC SHRINKFILE command, I am getting the attached error message. The TL Log files are on the D drive in a folder called Data and name is ASCTrac_Log.LDF
I hope this is the last time I bother you. I am attaching a screen shot of the command you asked me to execute. These are located on the D-drive where the SQL DB is located. Is this correct. One more question. I went into the ALL TASKS/Maintenance and changed the time for the TL Backups to run at 4 PM. In the past it was set up to run before the DB backups were run around midnight. However, the TL backups ran at 4 PM and again at midnight, and the size of the LogFile increased to 13 GB. Am I missing something here. When the TL backup ran at 4PM its size was only 1.9 GB but when it ran again at midnight it increased to 13 GB. It seems as though when I go into the Maintenace and make changes it does not remove the old schedule, but adds the new time. How do I correct this. Thanks a lot for your help.
Like I said before, there's some process that runs at night and handles with huge amount of data. If transaction log isn't important for you, you can set database to simple mode and stop backing up transaction logs.
NOTE: You can run this command DBCC SHRINKFILE(2, 2) to shrink log
I still do not understand why I am not able to change the Maintenance Plan. I had originally set the TL backup to run at midnight 2 hours before the DB backup starts. I then changed the time to backup the TL to 4 PM instead of 12 AM. But the backup now runs at 4 PM and then at 12 AM. I do not understand why this is happening. What I am doing wrong. Is there a different way to edit the Maintenance Plan other than going back and redoing it iwth the changed schedule?
The only thing I can remember it's that you have 2 schedules for transaction log backup. You can delete Maintenance Plan and check that all jobs was deleted. Then create a new Maintenance Plan.
That's because you are working on wrong database. Should be MSDB. But be careful because sysmaintplan_subplans it's a SQL Server 2005 object no SQL Server 2000. Tables that exists in SQL Server 2000 are: sysdbmaintplans sysdbmaintplan_jobs sysdbmaintplan_history sysdbmaintplan_databases
Thanks a lot for all your inputs and suggestions. I have now deleted all the old Mintenance Plans and have been running a Tran Log Backup and DB backup once every day. Even though the Tran Log backups ran properly, this morning it showed that 98% of the space used. The TL backups ran at 4PM Sunday evening, and the DB backups ran at 4 AM Monday morning. Normally there are no transactions processed over the weekend. How can I reduce the Log Space Used?