Ads

27 April 2012

DBCC ERROR :-The page may be invalid or may have an incorrect alloc unit ID in its header


BELOW IS THE DBCC ERR:-

 
Table error: page (1:735428) allocated to object ID 2025058250, index ID 0, partition ID 132714217473000, alloc unit ID 132724217472000 (type In-row data) was not seen. The page may be invalid or may have an incorrect alloc unit ID in its header.
There are 75408262 rows in 744739 pages for object "tblancellationHistory".
CHECKDB found 0 allocation errors and 1 consistency errors in table 'tblCancellationHistory' (object ID 2025058250).

 TO KNOW THE OBJECT, ANYWAY ITS ALREADY MENTIONED IN THE ERROR MSG :

USE
go
SELECT au.allocation_unit_id, OBJECT_NAME(p.object_id) AS table_name, fg.name AS filegroup_name,
au.type_desc AS allocation_type, au.data_pages, partition_number
FROM sys.allocation_units AS au
JOIN sys.partitions AS p ON au.container_id = p.partition_id
JOIN sys.filegroups AS fg ON fg.data_space_id = au.data_space_id
WHERE au.allocation_unit_id = (
allocation_unit_id) -- in above case 132724217472000
ORDER BY au.allocation_unit_id

Once you get the Object name try the following ,

DBCC CHECKTABLE(TABLENAME, REPAIR_REBUILD)

The above dont have any impact on data, so there is no data loss.

If that dint solve the purpose, we have to opt for DATA LOSS


DBCC CHECKTABLE(TABLENAME, REPAIR_ALLOW_DATA_LOSS)

Make sure we have enough permission to run the above.
 If it dint solve we need to contact microsoft, hopefully it will resolve.

26 April 2012

A program running on this computer is trying to display a message.

To disable Interactive Services Detection

 
  1. Click Start > Control Panel and then double-click Administrative Tools.
  2. Double-click Services.
  3. Scroll down and double-click Interactive Services Detection.
  4. On the General tab, change the Startup type to Manual or Disabled.
  5. Click OK and restart the computer.

11 April 2012

Enrolling the instance. Step failed. An exception occurred while executing a Transact-SQL statement or batch.


If you connect to the instance of SQL Server to enroll using SQL Server Authentication, and you specify a proxy account that belongs to a different Active Directory domain than the domain where the UCP is located, instance validation succeeds, but the enrollment operation fails with the following error message:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Additional information: Could not obtain information about Windows NT group/user '', error code 0x5. (Microsoft SQL Server, Error: 15404)
This issue occurs in the following example scenario:
  1. The UCP is a member of "Domain_1."
  2. A one-way domain trust relationship is in place: that is, "Domain_1" is not trusted by "Domain_2" but "Domain_2" is trusted by "Domain_1."
  3. The instance of SQL Server to enroll into the SQL Server Utility is also a member of "Domain_1."
  4. During the enroll operation, connect to the instance of SQL Server to enroll using “sa”. Specify a proxy account from "Domain_2."
  5. Validation succeeds but enrollment fails.
The workaround for this issue, using the example above, is to connect to the instance of SQL Server to enroll into the SQL Server Utility using “sa” and provide a proxy account from "Domain_1."

1. Connect utility using SA
2. For enrolling use Domain 1 usr and pwd



More On  :- http://msdn.microsoft.com/en-us/library/ee210592.aspx

30 March 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

27 March 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