如何在DataGrip 2017.3.1中删除额外的控制台
Hey there! Let’s work through getting rid of those extra consoles you created, so you only have the original one left. I’ve dealt with this exact scenario a few times, so here are practical steps depending on what tool you’re using (I’m assuming something like SQL Server Management Studio since it’s the go-to for database work):
Quick Fix: Close Extra Tabs Directly
If those green-arrow consoles are just open query windows, this is the easiest way:
- Right-click on any extra console tab and select
Closeto remove it one by one. - To speed things up, hold down
Ctrlto select multiple extra tabs at once, then right-click and chooseCloseto delete them in bulk. - If you want to keep only the original (blue-arrow) console open, right-click its tab and pick
Close All But This—this will instantly shut down all other open query windows.
If Tabs Are Unresponsive or Stuck
Sometimes consoles can hang or not behave as expected. Try resetting your IDE’s layout to default:
- For SSMS: Head to the top menu, go to
Window>Reset Window Layout. This will restore the default setup, wiping out any extra consoles you don’t need. Pro tip: Save any unsaved queries in your original console first—this reset won’t delete your saved files, but unsaved work might be lost.
For Persisted Database Console Connections
If these are actual active connections to your Dev database (not just query tabs), you’ll need to disconnect or terminate them:
- Open the Object Explorer (usually the left-hand pane).
- Expand the
Connectionsnode under your Dev database to see all active sessions. - Right-click on the extra console connections you want to remove and select
Disconnect. - If a session won’t disconnect, you can kill it with a query:
- First, run
sp_who2to list all session IDs and find the ones linked to your extra consoles. - Then execute
KILL <session_id>(replace<session_id>with the actual number). Important: Only do this if you’re certain these sessions aren’t running critical processes!
- First, run
Final Reminder
Always double-check which consoles you’re closing—make sure your original (blue-arrow) console’s work is saved before making any changes. It’s easy to accidentally close the wrong one in a rush!
内容的提问来源于stack exchange,提问作者matthew.kempson

