Steps to restore the resource database


Few days back, I had discussion with my team member regarding the resource database and we all are curious to see the resource database.

As you all know resource database is hidden database and we can’t see it SQL Server. We follow below steps to restore the resource database and it worked. We can see the resource database.

Resource database file location
By default, these files are located in :\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\. Each instance of SQL Server has one and only one associated mssqlsystemresource.mdf file, and instances do not share this file. In a cluster, the Resource database exists in the \Data folder on a shared disk.

Follow below steps if you want to see the resource database.
Step 1: Copy the resource database MDF/LDF file to different location and rename it. We have name both data and log file to resourcetest.

Step 2: Execute the below command to attach the resource database file and you can see the resource database.

USE [master]
GO
CREATE DATABASE [resourcetest] ON 
( FILENAME = N'J:\resourcetest.mdf' ),
( FILENAME = N'J:\resourcetest.ldf' )
 FOR ATTACH
GO

Resource Database Image

Advertisements

2 thoughts on “Steps to restore the resource database

Thanks for the comment, will get back to you soon... Jugal Shah

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s