如何确定已安装的 SQL Server 实例及其版本? [英] How can I determine installed SQL Server instances and their versions?

查看:42
本文介绍了如何确定已安装的 SQL Server 实例及其版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试确定我安装了哪些 sql server/sql express 实例(手动或以编程方式),但所有示例都告诉我运行 SQL 查询以确定这一点,假设我已经连接到一个特定的实例.

I'm trying to determine what instances of sql server/sql express I have installed (either manually or programmatically) but all of the examples are telling me to run a SQL query to determine this which assumes I'm already connected to a particular instance.

推荐答案

在命令行:

SQLCMD -L

OSQL -L

(注意:必须是大写的L)

(Note: must be a capital L)

这将列出您网络上安装的所有 sql 服务器.您可以设置一些配置选项来防止 SQL Server 显示在列表中.要做到这一点...

This will list all the sql servers installed on your network. There are configuration options you can set to prevent a SQL Server from showing in the list. To do this...

在命令行:

svrnetcn

在启用的协议列表中,选择TCP/IP",然后单击属性.有一个隐藏服务器"复选框.

In the enabled protocols list, select 'TCP/IP', then click properties. There is a check box for 'Hide server'.

这篇关于如何确定已安装的 SQL Server 实例及其版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆