15 April 2015

Resource database location in SQL Server 2000 or 2005 or 2008 or 2008R2 or 2012

Hi, This time I am going to post about resource file location. Actually today I am trying  to take backup of Resource database backup on my production environment. Finally I have used below commands and I have received beautiful output.

The below script is very much helpful to find the physical location of the Resource database.

By default the Resource database id is 32767. So using this ID we can get location of the database very easily.

Use master
GO
select 'ResourceDB' AS 'Database Name'
    , NAME AS [Database File]
    , FILENAME AS [DB file Location] 
from sys.sysaltfiles 
    where dbid = 32767
GO


--- 
By Shivasagar V

No comments:

Post a Comment