SQL databases info

  • Hi,

    I am looking for a query where i can get alll the information for all databases, users, linkedservers etc... for that instance.

    eg: which user is mapped to what database with kind of access, all the linked servers, database recovery models etc.. I have one but might need more descriptive since doesn't list all

    exec sp_helpsrvrolemember 'sysadmin'

    go

    EXEC sp_MSforeachdb @command1= "PRINT '?' EXEC [?].dbo.sp_helprolemember 'db_owner'"

    go

    Thnaks so much all for looking into it and hope find something even better that above query.

  • I don't think there is just one script to get all your desired information. You could search the script section of SSC site for several scripts and combine them yourself. See http://www.sqlservercentral.com/Scripts/

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **
  • As HanShi said, there really isn't one query (I suppose you could write one) that would get all that for you. I recommend you look at SQL Power Doc[/url] on codeplex. This a set of PowerShell scripts that, I believe, can provide you with all the information you are looking for.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply