Database.ID Property
SQL Server 2008
Gets the database ID value that uniquely identifies the database.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Gets the database ID value that uniquely identifies the database.