Customer Question: How can I open an unshared worksheet using just the keyboard?

Ctrl+Shift+N on an existing worksheet is the easy answer.

Customer Followup Question: But, if you’re currently ON an existing unshared worksheet, this won’t work.

Then, you need to hit ALT+F10.

Jeff, What is an Unshared Worksheet?

An unshared worksheet is a SQL worksheet that has a dedicated database connection behind it. These come in handy when your database connection is busy doing OTHER things.

The ‘problem’ with Ctrl+Shift+N is that it only works if you’re on the main/original worksheet. You CAN’T open a new unshared worksheet from an existing unshared worksheet. To keep these connections ‘private’ or exclusive to the worksheet, we do ‘special things’ in the code. And as a result, you can’t spawn one unshared worksheet from another one.

But

But, you can do THIS.

Enable in preferences:

This applies to SUBSEQUENT worksheets opened on a database, not the first one.

So when you connect, you get a worksheet by default. Use it. Go crazy. Run a run long running query, and need another? Ctrl-Shift-N will get you a new worksheet, and a new connection.

Go crazy some more. Need another worksheet/connection?

Alt-F10.

Should work wherever you are.

Then pick your new connection – this dialog is keyboard-able.

Each worksheet gets its own connection.

Close ‘Em, or Suffer the Wrath of your DBA

Connections aren’t free. They require server process(es), database resources, and more. Abuse the system, and you will have to turn in your db credentials. And then you can’t have fun writing SQL anymore.

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

2 Comments

  1. Kirby R Sand Reply

    Hi Jeff,

    Here’s what I want to do. I have a worksheet in GIT that I open in SQL Developer. I choose which database/username I connect to via the dropdown in the upper right. Let’s say I choose PROD_KIRBYS. Next, I want to open another SQL worksheet from my GIT repo and I need to connect to the same user/DB. When I select the same PROD_KIRBYS from the dropdown it is a shared connection but I need it to be an unshared connection. My preferences are set to “New Worksheet to use unshared connection” but that doesn’t give me an unshared connection in this case.

    My workaround is to open an empty SQL worksheet with an unshared connection and copy/paste my SQL to that new window. Then, when I make changes and need to commit those changes in GIT I have to copy/paste back to the original file and save. It’s a bit clunky and error-prone.

    Am I doing something wrong, or is this just not a supported feature?

    Thanks as always!

    -Kirby

    • Unfortunately there’s no way to open a file with an unshared worksheet/connection.

      You could create connections A, B, C and use those for your scenario however.

Write A Comment