Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Dumb Profiler Question

Author  Topic 

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-11-17 : 12:40:25
Given DatabaseID in profiler, how do I figure out the Database name? I'm guessing it's a select to a table in Master, but I can't figure it out. I tried to add the database name to profiler, and it gave me an error message about "low server version." The server is SQL 7, and I'm running the SQL 2000 tools.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>

rharmon
Starting Member

41 Posts

Posted - 2003-11-17 : 12:49:15
select * from sysdatabases where dbid = <dbid>

rob
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-11-17 : 12:50:48
/me smacks head
Why didnt i know that!

Thanks man!

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

denisemc
Starting Member

26 Posts

Posted - 2003-11-17 : 12:58:09
Another option:
SELECT DB_NAME ( database_id )
Go to Top of Page
   

- Advertisement -