Monthly Archives: January 2010

Recover Suspect SQL Server 2005 Database

Dear All

Please Read the follwoing documentation for

Recover Suspect SQL Server 2005 Database
one of our Digital university client’s SQL server  2005 database that has the wrong database status.  For some reason it is in the ‘Suspect\Offline’ mode.  And I have been told by project manager to check and correct the problem quickly and get the database back online.  How can I do so?   Once the status is correct, do I need to take any further steps? 


I have taken use of the script below to correct the SQL Server 2005 database status,.  We also need to correct any sort of corruption and understand why this occurred in the first place. 

Database Status Correction Script

The script below will change the database to be in simple recovery mode, which may or may not be the needed configuration for your database.  As such, it is necessary to review the database configurations once this script has been executed.  In addition, it is necessary to change the ‘DBName’ to your database name in single quotes.

EXEC sp_resetstatus ‘DBname’;


DBCC checkdb(‘DBname’)




Check for Corruption

The next step in this process is very key.  It is necessary to determine if the database has any corruption and ensure that the database will be able to support the users.  If the database has corruption, we may be exposing ourself to more issues by just changing the database status without correcting the underlying issue.  To identify the underlying issue, execute the following commands:

  • DBCC CHECKDB – Validate the overall database integrity
  • DBCC CHECKCATALOG – Validate the system catalog integrity
  • DBCC CHECKTABLE – Validate the integrity for a single table

To resolve the issue, we may need to do one or more of the following:

  • Drop and Recreate Index(es)
  • Move the recoverable data from an existing table to a new table
  • Update statistics
  • sp_recompile

To ensure the issue is corrected, it is a good idea to re-run the identification commands listed above and validate that they do not have any issues. 


Prashant Deshpande


Leave a comment

Filed under Database Server, Server Application, SQL Server

Remove Mailboxes from exchange server 2007 for corrupted Domain

Dear All

As the Branch Domain controller had some issues, so the users of that domain had to be freshly created on other child domain FS which has resolved the login issue for the users in domain and Pop3 account was configured for them, they were able to send the emails. As the mailboxes are present on exchange server, all the emails for those users are collected by exchange server and those users were unable to receive emails which was a major issue.

As exchange server mailboxes were already created for old child domain so when we were trying to delete these mailboxes in exchange server, it was trying to contact the old child domain controller. Due to some issues in the old child domain controller it was unable to contact it and we were not able to delete those mailboxes from exchange server.

So I tried by restoring System State Backup on another server but as the hardware configuration mismatched the windows 2003 OS crashed after restoring system state backup . Tried the same for multiple times with multiple systems.

Then I thought that, as users are logging from new child domain and exchange server is also not able to contact the old child domain why don’t we remove the child domain entry from forest.

SO I then copied ADSIedit from Support Tools folder of windows 2003 CD and pasted it in c:\windows of root domain controller of forest with enterprise admin and schema admin rights . To use adsiedit tool we need to register the adsiedit.dll as

(I am not including the screen shots for security reasons)

Start -> run -> regsrv32 adsiedit.dll


Start -> run -> adsiedit.msc

Step 1

Explore the tab CN=configuration from left panel

Explore CN=Sites and from the specific site Select CN=servers tab

Here delete domain controller name of the old child domain

Step 2

Explore the tab CN=configuration from left panel

Explore CN=partitions you will see two records ( one is DNS , other is active directory partion ) for each of the Domain present in forest, delete both the records for the old child domain.

 After few minutes it will get replicated to the complete forest and automatically all the mailboxes associated to that domain will be removed from exchange server and even when we press ALT + CTRL + DEL, to login, you will not see the old child domain name in the Domain List  :).

Please use ADSIedit carefully as it explores all Schema data of Forest


Prashant Deshpande


Filed under Active Directory, Server Application

Tweaks to make Login Fast in Domain

Dear All

Today faced one problem that some of the systems were taking time at “Applying Computer Settings “ after specifying Login Credentials in Domain environment. so searched on many blogs and forums and found that it happens because of Group policy , but at my end no such scenario of group policy.
So done a little R & D as follows
Procedure executed

Step 1) Start –> Control panel –> Network Connections

Step 2) Advanced Menu –> Advanced settings

Step 3) go in Provider Order Tab

Step 4) move Microsoft Windows network to Upside
Step 5) now in services stop “ Web Client “ service and make it manual
Step 6) now close the Msoutlook.
Step 7) Start run  c:\program files\Microsoft Office\Office12\scanpst.exe
Step 8 ) provide the path of PST file (currently configured as data file)
Step 9) wait till PST scan gets complete
Now every thing is ok and from next time PC will boot Fast


Prashant Deshpande


Filed under IT Support, Operating System

Atomize the Outlook profile backup

Dear All
Please go through the document which gives the procedure about atomizing the backup of Outlook profile.
Scenario :- New domain has to be installed and shift all present users with there all existing settings including outlook profile.
Solution :- Consider login name ABCD for domain and login name ABCD for domain
for Windows XP OS
As per as user profile is concerned we can copy
c:\Document and Settings\\*.* to
c:\Document and Settings\\*.* after moving the system in new domain and successful first logon in new domain for user ABCD
for Windows 7 OS
As per as user profile is concerned we can copy
c:\users\\*.* to
c:\users\\*.* after moving the system in new domain and successful first logon in new domain for user ABCD

Outlook Profile backup and restore ( automatic )
Before moving the system in new domain,
As the Outlook profile resides in Registry hive HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles
We need to export and then in new domain needs to import the above hive.
Which is a manual process have to be done on all systems so I have used one trick .
Created a batch file as backup.bat

Reg export “HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles “ c:\prof.reg

And copy the file on domain controller at c:\WINDOWS\SYSVOL\sysvol\\scripts
Then created another batch file as restore.bat

Reg import c:\prof.reg

After creating these two files
Open Active Directory users and Computers Snap-in and right click on OU in which all users are present , Select group policy tab and click on Edit Button.

Go in User Configuration tab in that select scripts (Logon/LogOff) and from right side panel double click on logon and specify the backup.bat file path as its in sysvol folder which is default shared for all it will get executed on every login and backup of outlook profile will be taken automatically on c:\ .
Now move the system in new domain and then execute restore.bat manually on PC.
You will see outlook is automatically configured as it was previously.


Prashant Deshpande

1 Comment

Filed under IT Support