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.
| 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 |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2003-11-17 : 12:50:48
|
| /me smacks headWhy didnt i know that!Thanks man!Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
denisemc
Starting Member
26 Posts |
Posted - 2003-11-17 : 12:58:09
|
| Another option:SELECT DB_NAME ( database_id ) |
 |
|
|
|
|
|