The Worksheet in Oracle SQL Developer is your primary interface for writing and running your SQL and PL/SQL code. As you can imagine, I’ve already written quite a bit about how the worksheet ‘works’.
Today I want to spend just a few moments explaining the two different buttons for launching a new worksheet. With a worksheet open and active, you’ll see the following two buttons on two different toolbars:
Doing a mouse-over shows me that they indeed have different labels.
Application Toolbar New Worksheet Button
If you just click the button, SQL Developer will prompt you to ‘Select a connection.’ The worksheet will then open with said connection established. The drop-down attached to the button allows you to specify the connection as you click, so it’s one less step.
Worksheet Toolbar New Worksheet Button
Clicking this button will indeed open a new worksheet connected to the same database the current worksheet is using. So yeah, it’s a ‘faster click’ than the previous method, but the underlying mechanics are much different.
This new worksheet will have a new dedicated connection. As I’ve talked about before, if you have a long running query holding you up, you can always open an unshared worksheet to continue working on that database.
The unshared worksheet creates a new dedicated session which is not ‘shared’ by the rest of SQL Developer. Or in simpler terms, you would have two worksheets open to the database WITH two separate database connections. So if I were to update/insert/delete a row in the unshared worksheet, those changes wouldn’t be observed in the rest of SQL Developer until I issued a COMMIT from the unshared worksheet.
My kids already get this as I’ve been reading them this book for years:
Quick Bonus Tip: Disable New Worksheet On Connect
The default behavior in SQL Developer is to automatically open a new worksheet for every database connection you establish. This probably works quite well for most of you, but for those that do not appreciate this behavior, it’s easily disabled.