Posts

Showing posts from February, 2010

RESTORE HISTORY Table in MSDB

To find out restore history of databases we can use RESTORE HISTORY Table in the msdb database. We can run the below query and find out when the latest restore has happend for the particular database. SELECT * FROM msdb.dbo.RestoreHistory WHERE Destination_Database_Name='DatabaseName' ORDER BY Restore_Date DESC SELECT [restore_date] ,[destination_database_name] ,[user_name] ,[backup_set_id] ,[restore_type] ,[ replace ] ,[recovery] ,[ restart ] FROM [msdb].[dbo].[restorehistory] WHERE destination_database_name = 'AdventureWorks2012'

REPORTING SERVICES disabled in SQL Server 2005 Setup

While installing SQL Server 2005 setup in our box. REPORTING SERVICES will be in Disable mode. This is because IIS not installed in our system . IIS is compulsory for Reporting Services.

REBUILD THE master DATABASE

Step 1. Put SQL Server into Single User Mode The first thing you will want to do is stop the SQL Sever Sevicer (sqlservr.exe) and the associated services (Agent, Full Text, Etc). There are a few ways to do this, but the easiest way would be to use the SQL Configuration Manager (Start->All Programs->Microsoft Sql Server 2005->Configuration Tools->Sql Server Configuration Manager). From this console you can manage the various SQL server services running on the machine. Right Click on each service listed and stop the service. The services are stopped, you can proceed to Step 2. Step 2. Start the SQL server in Single User Mode Open a command window and navigate to the folder where Sqlservr.exe resides (generally :\Program Files\Microsoft Sql Server\MSSQL.1\MSSQL\Binn). Run “sqlserver.exe -m” to start the sql server from single user mode. Step 3. Rebuild the system databases In SQL 2005, the rebuildm.exe program is nto supported. To rebuild the master database you nee...