World Search

Friday, March 30, 2012

Error 952. Database 'YYYY' is in transition. Try the statement later.

This can happen sometimes if you try to take a DB offline or perform certain other operations and they fail.

Sometimes the lock can be cleared if you close the SSMS instance that attempted the operation, then reopen it. Close and reopen any SSMS instances attached to the server.

It can also occur if you try to take the DB offline while a long query is running. Check the activity monitor and try killing any long-running queries, if applicable and safe.


If neither of the above works, close all SSMS instances, then restart SQL through the SQL Server Configuration Manager. Usually that will cure it, although the DB may be in recovery mode at first.

Check the database is offline or what, check the corresponding MDF and LDF files it may be missing too.
In that case need to restore the DB from Latest Backup.

ALTER DATABASE SET OFFLINE WITH ROLLBACK IMMEDIATE
...
ALTER DATABASE SET ONLINE

Tuesday, March 27, 2012

Backup detected log corruption in database Context is Bad Middle Sector.

Follow the following steps,


1. Stop all user activity in the database
2. Switch to the SIMPLE recovery model (breaking the log backup chain and removing the requirement that the damaged portion of log must be backed up)
3. Switch to the FULL recovery model
4. Take a full database backup (thus starting a new log backup chain)
5. Start taking log backups

http://www.sqlskills.com/BLOGS/PAUL/post/How-can-a-log-backup-fail-but-a-full-backup-succeed.aspx

Tuesday, March 20, 2012

SQL Server® 2008 R2 Service Pack

http://www.microsoft.com/download/en/details.aspx?id=26727

latest SQL Server 2000 service pack

http://support.microsoft.com/kb/290211

latest service pack for SQL Server 2005

http://support.microsoft.com/kb/913089

SQL Server 2008 SP2

•SQL Server 2008 SP2: http://go.microsoft.com/fwlink/?LinkId=196550



•SQL Server 2008 SP2 Express: http://go.microsoft.com/fwlink/?LinkId=196551


•SQL Server 2008 SP2 Feature Packs: http://go.microsoft.com/fwlink/?LinkId=202815


•SQL Server 2008 SP1 CU’s Released: http://support.microsoft.com/kb/970365


•Knowledge Base Article For Microsoft SQL Server 2008 SP2: http://support.microsoft.com/kb/2285068

Windows 7 and Windows Server 2008 R2 Service Pack

http://www.microsoft.com/download/en/details.aspx?id=5842

Thursday, March 1, 2012

New T-SQL Features in SQL Server 2012

SQL Server 2012 has several major enhancements including a new look for SSMS. SSMS is now similar to Visual Studio with greatly improved Intellisense support. The main new TSQL features in SQL Server 2012 are:



WITH RESULT SETS


OFFSET AND FETCH


THROW in Error handling


SEQUENCE