Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Oracle SQL Developer 4 to connect to multiple databases at the same time, sometimes using different credentials that those saved in connection properties. So I have multiple tabs in main window labeled with DB names, but I'd like also have indication of under which account I'm connected (seems natural to have it in tab label/name). Any option setting to achieve this? Probable I'm looking in wrong place or can do some query to check currently using credentials?

share|improve this question
up vote 4 down vote accepted

You could save multiple connections to the same db but with different credentials. Give them useful names like user@thisdb and you'll be able to view that in SQL Developer at a glance in the top right corner of the worksheet.

And my favorite part: if you need to run the same SQL as multiple users or in different environments or both, you'll find that the connection name in the top right corner of the worksheet is actually a dropdown list, so it can be changed on the fly.

share|improve this answer
+1 I don't have any experience with sql developer but naming the connections is the method that I use with other tools – miracle173 Mar 20 '14 at 23:40

Both the USER SQL function and the SYSCONTEXT SQL funtion return the name of the session user (example).


The SYSCONTEXT, the UID and the USERENV SQL function can give you further information to your session.

share|improve this answer

You can check your environment with a statement like

SELECT username, osuser, machine, schemaname FROM gv$session WHERE sid= ( SELECT sys_context('userenv','sid') FROM dual );

Without issueing a SQL command the only way would be to set the color highlighting for the connection manually.

share|improve this answer
a user must have special privileges to query gv$session. Better one uses the sys_context function directly to get the information – miracle173 Mar 20 '14 at 23:32

You can do a few things:

  1. Create different Tab Groups (Right-Click on any Worksheet) to group your Tabs
  2. Change default Worksheet name (only using SQLDev command in Worksheet): set worksheet name MyWorksheet2
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.