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 |
|
Gopher
Yak Posting Veteran
83 Posts |
Posted - 2008-01-18 : 10:35:00
|
| Hi AllDoes any one know a SQL 2005 query which will tel me what the server name or database names are?ThanksGopher |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-01-18 : 10:42:52
|
| [code]select @@servername --tell you the server nameselect db_name() -- tell you current database name[/code]Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
Gopher
Yak Posting Veteran
83 Posts |
Posted - 2008-01-18 : 11:46:14
|
| Cool - Thats great thanks!Can you do the same for the SQL Version (i.e. 2000 SP4 or 2005 SP2)? |
 |
|
|
|
|
|