Sample Header Ad - 728x90

SSMS How do I open a new Query Window using Same Connection Instance of current Window

3 votes
2 answers
3270 views
Coming from Oracle I have discovered that SSMS connects slightly different than Oracle's SQL Developer. Oracle you click ONE connection and then all tabs you open then use that Connection. SSMS creates a completely new Connect/Instance for each window/tab I open. **I don't want this**. TWO pet peeves come to mind with this behavior I am trying to get around. >1. View affect of Script before COMMIT in another Window I want to be able to run a script in one window... and in another Window have the ability to Query the Non-Committed data to simply view the results... Currently I have to use the SAME Window I ran the script in order to simply VIEW the affect. (Commit/Rollback buttons come to mind - Oracle I miss you sometimes). >2. View data stored in #TempTable from another Window I am creating a #TempTable using a script... but want to query it's data from another Window. Currently when I open another window (Unlike Oracle's SQL Developer) it opens the window using a new connection/instance. How do I query the data in #TempTable from another window rather than the window I ran the script in? The above is just simply for organizational reasons... it's SUCH a pain to run a script... and then from that same tab have to then write in other code when I don't want to edit/add any other code to the page that contains the script I ran. If I'm doing something wrong or missing some Point please let me know.
Asked by Code Novice (275 rep)
Jan 6, 2020, 05:53 PM
Last activity: Dec 7, 2023, 08:01 PM