Script to automatically open SQL Server Management

2019-08-12 23:08发布

问题:

Please I need help with a script that can help me open the SQL Server Management Studio 2005 from a button in an another interface.

Thanks Roger

回答1:

sqlwb.exe is SSMS in SQL Server 2005 and it has parameters such as -S etc for Server name, but also has a filename parameter.

At command prompt, run sqlwb /? to get command line usage



回答2:

With C#:

using System; 
using System.Diagnostics;

void StartStudio() 
{
      Process proc = new Process();
      proc.StartInfo.FileName = "ssms";
      proc.Start(); 
}