March 10, 2004 at 3:04 pm
I am running a trace to track sql performance. The trace file shows the databaseid. How to find database name from databaseid?
March 10, 2004 at 4:06 pm
SELECT DB_NAME(database_id)
--Jonathan
March 11, 2004 at 7:00 am
I recommend checking out the [SQL Books Online] for DB_NAME.
Cheers,
Ken
March 11, 2004 at 7:18 am
Just kidding, but wasn't that the same Jonathan already demonstrated?
In Germany we have a saying that might translate to
"All good things are three"
So...
I think SELECT DB_NAME(database_id) is what you are looking for. Take a look at BOL for explanation.
...too much coffee today, don't take it too serious and it's not offending.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
March 11, 2004 at 7:28 am
How embarassing...
I was so focused on answering the question that I didn't even -notice- Jonathan's reply (sorry about that, J...)
Not -enough- coffee, rarely serious and never offended. Thanks/humble apologies. I'll make it up by standing in the corner of the chat room for a 10 minute timeout...
Cheers,
Ken
BTW: Frank. That profile pic is a classic, man.
March 11, 2004 at 7:33 am
That's a brilliant mindset
You mean my avatar? I was multiple times in cinema with my elder son. He can almost recite the whole film, I guess.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
March 11, 2004 at 8:32 am
Thanks a lot for you all!!!!!
SELECT DB_NAME(databaseid) is exactly what I am looking for.
David
March 11, 2004 at 12:45 pm
Hey, Ken,
what is your avatar?
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
March 11, 2004 at 12:52 pm
Shamelessly stolen from a particular Gary Larson 'The Far Side' cartoon.
Likeness is close but I have a beard...
March 11, 2004 at 1:49 pm
Now that you've mentioned it.
Hey, that guy Gary Larson is even known here in Germany.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply