I’m working on a project where I need to automatically launch SQL Server Management Studio 2016 and load several SQL script files at once. The problem is that every time my application starts SSMS, the splash screen appears and slows down the process.
I found some documentation about command line parameters that should allow me to skip the startup screen and open multiple query files simultaneously, but I can’t figure out the exact syntax to use. I’ve tried a few different combinations but nothing seems to work properly.
Does anyone know the correct command line arguments to achieve this? I basically want to start SSMS silently and have it automatically open 3-4 different .sql files in separate tabs within the same instance. Any working examples would be really helpful since I’m stuck on this.
hmm interesting challenge! have you tried using the -nosplash parameter yet? i’m curious what specific combinations you’ve already attempted - might help us troubleshoot better. also wondering if your automation needs a delay between launching ssms and loading the files?
The command line syntax you need is ssms.exe -nosplash "file1.sql" "file2.sql" "file3.sql"
where you specify each SQL file path in quotes after the nosplash parameter. I encountered this same issue when automating database deployments and discovered that SSMS can handle multiple file arguments in a single command. The key is ensuring your file paths are absolute rather than relative paths, especially when launching from an application. One caveat I learned through trial and error is that while the nosplash parameter eliminates the startup screen, SSMS still takes a moment to fully initialize before the files appear as tabs. If your automation depends on the files being immediately available, you may need to implement a brief polling mechanism to verify the instance is ready.
actually you might want to try the -E parameter along with -nosplash for trusted connection. something like ssms.exe -E -nosplash file1.sql file2.sql
worked for me before. sometimes the quotes around filenames can cause issues depending on your setup tho