Is there a script that returns a "per-server" count of databases in a domain?

  • Thanks,

     

    Jaybee

  • Number of databases in a server ?

    select count(*) from master.sys.databases

    if you want to exclude system databases:

    where database_id > 4

    If you are running accross multiple servers, make sure that you have connections from a centralized server to remote servers and create a cursor to loop through each server with above query.

     

     

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

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