SharePoint (2003 thru Online): List of All DBs in MOSS 2007

Monday, July 20, 2015

List of All DBs in MOSS 2007

Tried to find list of DB’s used by SharePoint. We used to go searching the Central Admin - Application Management - Content Databases option and note all the databases against the URLs.

1. Found an awesome option, navigating to Central Admin >> Operations >> Perform a Backup




2. You can also run the following script on "SharePoint_Config" and get the list. Change the DatabaseInstance and DatabaseServer in the below script with your details.

SELECT o.[Name] AS 'SharePoint_Config',
    Instance.[Name] AS 'DatabaseInstance',
    [Server].[Name] AS 'DatabaseServer'
FROM Objects AS o
    INNER JOIN classes c on c.id = o.classid     
    LEFT JOIN Objects AS Instance ON o.ParentId = Instance.Id
    LEFT JOIN [Objects] AS [Server] ON Instance.ParentId = [Server].Id
    WHERE c.Fullname LIKE '%Administration.SPConfigurationDatabase%'
    OR c.Fullname LIKE '%Administration.SPContentDatabase%'
    OR c.Fullname LIKE '%Administration.SharedDatabase%'
    OR c.Fullname LIKE '%Administration.SearchSharedDatabase%'
    OR c.Fullname LIKE '%Administration.SPSearchDatabase%'


No comments:

Post a Comment