SSMS 2017 – Open SQL Files in Existing App with Raised Admin Permissions

sql-server-2017ssms

I realise this is an old chestnut, but does anyone have a definitive solution?

When SSMS (2017) is 'run as administrator', double clicking a SQL file in explorer will open another new instance of SSMS (and not open the file). This is not good. Double clicking a SQL file should open it in the existing open SSMS app.

Is there a solution to this?

What reasons are there to 'run as admin' by default or can this be turned off without impacting functionality?

Many thanks,

James

Best Answer

In SSMS use Ctrl+O to open the file instead of double-clicking in explorer.