我想有一个我的数据库服务器的列表(我是一个开发人员),我目前有一个RDP文件列表,我连接到不同的机器。 在SQL Server Management Studio中是否有类似的function,可以帮助我直接到达需要的地方,而不必等待login屏幕popup并询问我需要哪个服务器?
是的,你可以使用下面的命令:
ssms.exe -S SERVERNAME -d DATABASENAME -E
你可以运行这个使用运行,或者把它放到一个.txt文件,并将扩展名改为.bat并运行。
运行smss.exe /?可以find更多的信息:
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