The two preferences in Database > Worksheet that control this behavior are:
1. Open a Worksheet on connect
2. New Worksheet to use unshared connection
So if Open a Worksheet on connect is enabled (the default setting), then that first worksheet shares the Connections navigator view connection. Disabling it will make any New Worksheet connections unshared.
It is true, however, that if you open a SQL file, then there is currently no way to connect in any mode but shared.
SQL Developer Team
That is a workaround but, come on SQL Dev team - you're better than that aren't you?
Instead of having us manually create and manage all those duplicate connections, could you enhance the tree so that we can see all connections (shared or unshared)? One of the problems with unshared connections is their invisibility - this would let us disconnect, reconnect, etc. as well.
I think what Makel is saying (shades of The Right Stuff) is that he wants a list of the open sessions, that is, live connections to the database.
I completely agree that it would be great to be able to manage the separate sessions/connections that are actively working with a particular database definition. It's been a notion of mine but I hadn't seen it to +1 it before.
I was a little thrown by the 'put it in the tree' idea. However, what I think he means is that you would have the tree of "static connections" and in addition to (or instead of) the little connection indicator plug, there would be a sort of pop-up identifying the live sessions attached to that particular database using that particular set of credentials.
I'm not really hot on the tree myself, so I don't really think about expanding its work.
- Andrew Wolfe
Thanks for interpreting Andrew!
Putting it differently, I don't have a need for shared or unshared connections - all I need is connections that I can use as I see fit.
I want to be able to pick a connection when I open a script file. If the connection has been disconnected, I'd like to be able to reconnect it. If I've been working in a live database, I want to be able to see all my connections and make sure they're disconnected when I'm done.
I don't want to be blocked - either by the tree querying the data dictionary, or by the query I ran in my first worksheet.
I think I'm suggesting that you change the top-level entity from "connection" to "database". If I look at Database1, there should be a node in the tree that shows an entry for each of my connections. Maybe in v5?