finding the database name

  • Hi,

     

    May i know the query i need to use to list the database name as well as other databases present in my server.

     

    thank you

  • Select * from master.dbo.SysDatabases

    Select db_name()

  • While your at it:

    Select db_name(dbid) From master.dbo.sysdatabases

    Select db_id('databasename')

    sp_helpdb

    sp_helpdb 'databasename'

    These are nice to get use to when resolving system problems.

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

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