我想要一个我的数据库服务器列表(我是一名开发人员),我目前有一个我连接到的不同机器的 RDP 文件列表。SQL Server Management Studio 中是否有类似的功能可以帮助我直接转到我需要去的地方,而不必等待登录屏幕弹出并询问我想要哪个服务器?
是的,您可以使用以下命令:
ssms.exe -S SERVERNAME -d DATABASENAME -E
Run Code Online (Sandbox Code Playgroud)
您可以使用 run 运行它,也可以将其放入 .txt 文件并将扩展名更改为 .bat 并运行它。
通过运行 smss.exe /? 可以找到更多信息:
Usage:
ssms.exe [-S server_name[\instance_name]] [-d database] [-U user] [-P password] [-E] [file_name[, file_name]] [/?]
[-S The name of the SQL Server instance to which to connect]
[-d The name of the SQL Server database to which to connect]
[-E] Use Windows Authentication to login to SQL Server
[-U The name of the SQL Server login with which to connect]
[-P The password associated with the login]
[file_name[, file_name]] names of files to load
[-nosplash] Supress splash screen
[/?] Displays this usage information
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5751 次 |
| 最近记录: |