如何在SQL Server中查找服务器名称 [英] How to find server name in SQL server
本文介绍了如何在SQL Server中查找服务器名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
...
当我提供DB_name时,我在那个DB中有一个数据库,我想检索有关该DB的所有信息,例如服务器名,登录名,密码
Hi,...
I have one database in that DB when i give DB_name i want to retrieve all the information about the DB like server name, login name, password
it possible or another idea for that...
推荐答案
您可以使用以下文章获取服务器名称,实例名称
枚举SQL Server(ADO.NET)实例 [ ^ ]
关于登录用户,请参见以下文章.
SQL SERVER – 2005 –获取最新信息用户–登录用户 [
You can get Server name, instance name using following article
Enumerating Instances of SQL Server (ADO.NET)[^]
Regarding Logged In user please see below article.
SQL SERVER – 2005 – Get Current User – Get Logged In User[^]
获取服务器名
To Get The ServerName
select @@SERVERNAME
这篇关于如何在SQL Server中查找服务器名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文