Friday, February 24, 2012

DatabaseName Database ID Map?

Hi...
In SQL Profiler, it is easy enough to the the database ID from a trace.
That said, it would be nice to know what database the ID number
represents. How can I map the database ID to it's human-friendly name?
Thanks,
JohnSELECT DB_NAME(<dbid> )
http://www.aspfaq.com/
(Reverse address to reply.)
<jpuopolo@.mvisiontechnology.com> wrote in message
news:1109369484.318741.212180@.o13g2000cwo.googlegroups.com...
> Hi...
> In SQL Profiler, it is easy enough to the the database ID from a trace.
> That said, it would be nice to know what database the ID number
> represents. How can I map the database ID to it's human-friendly name?
> Thanks,
> John
>|||Aaron:
Couldn't be easier! Thanks.
John
Aaron [SQL Server MVP] wrote:
> SELECT DB_NAME(<dbid> )
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
> <jpuopolo@.mvisiontechnology.com> wrote in message
> news:1109369484.318741.212180@.o13g2000cwo.googlegroups.com...
trace.
name?