I have several long queries in SQL Server Management Studio. If my connection is lost/broken (e. g. after Restore of the database), how can I reconnect my SQL query tab to the database? My context menu for the connection only contains deactivated items...
It is not too much work to copy everything, open a new SQL query tab on my database and paste it, but "smart" is something completely different.
Just click "Execute" and it will reconnect again.
After reconnecting the database - as described here - you must still select your database from "available databases" pull down menu. Then your queries start to work
Click the 'Change Connection' icon and it will allow you to reconnect back to the DB
I see this happening only when I use F5 for the execution of the script and I get error. Only then the connection options are disabled for some reason.
Anyway the solution to this state is clicking the Execute button (or context menu button if you right click) as energyguy78 suggested. That should re-connect the tab.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With