Mostly Making oracle easy, mostly:
  • Deploy updates to multiple Oracle Databases, concurrently
  • Getting started with Oracle Database CI/CD & SQLcl Projects
  • SQLcl Projects: Automating Oracle Database app deployments
  • Connecting to Oracle using VS Code & Kerberos Auth
  • How to Export all of your Oracle Database REST APIs
  • Organize VS Code Database Environments: Connection Folders
  • SQL Developer for VS Code 25.1: Connection Folders are here!
  • Secure IOT device uploads to Oracle Database via REST API
Search for:
  • X (Twitter)
  • YouTube
  • LinkedIn
ThatJeffSmith ThatJeffSmith
  • SQLDev / VS Code
  • SQLDev Web
  • REST APIs
  • Data Modeling
  • Ask A Question
  • About
  • Search for:
In SQL Developer

Logins, TNS, DBMS_OUTPUT, & dates in SQLDev for VS Code

January 19, 2024 2 Mins Read

I’m lazy, so I’m going to address like 4 different topics in a single example.

Our favorite debugging tool, DBMS_OUTPUT

The questions I’ve been seeing most over the past 3 days since we released the #1 trending extension in the Visual Studio Marketplace, are:

  • how do get DBMS_OUTPUT
  • where are preferences stored
  • do you support TNS

How to get DMBS_OUTPUT

The answer is easy, SET SERVEROUTPUT ON, then run your script, look in the Script Output panel.

Where are preferences stored?

Under the Extensions section of VS Code’s preferences, look for SQL Developer.

There’s a reason I’m looking at this specific page.

Do you see what I see? I’m referencing a login.sql file. That will get executed every single time we open a connection.

In that file, I have –

set serveroutput on
set timing on

Let’s go look at another set of preferences, under NLS –

If you’re not American, here’s your trigger warning.

So when I run this block of code, to PRINT the output of the SYSDATE function, I get the date with the date format I want, and I get the amount of time it took to execute, all because my session as TIMING and SERVEROUTPUT enabled.

TNSNames

Yeah, there’s a preference for specifying this as well. You can set that in the connections panel, and then you should see your Service names pop up when creating new connections.

show tns is a quite handy command!

A quick thank you

Download, leave a review, or even ask a question.

I have the best job in the world. I get to help build cool things and then show if off. We have a huge team of talented folks behind the scenes that made this possible. Thanks to those folks, I love coming into work ever day to see what new toys we’ve put together.

And, thanks to everyone who has taken the time to get the new extension, play with it, and share your feedback! I’m going to do my best to not only respond to every note, question, etc, but also action item changes, file bugs, etc to satisfy the needs of the community as best as I can.

If I don’t respond immediately, or after a day or so, just ping me AGAIN.

dateloginpreferencessqldevtnsnamesvs code
Author thatjeffsmith

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

  • Website
Prev Post

Logging in our VS Code Extension, the code behind the code

January 18, 2024 2 Mins Read
Next Post

Code Completion in Oracle SQLDev extension for VS Code

January 22, 2024 3 Mins Read

Related Posts

Deploy updates to multiple Oracle Databases, concurrently

May 8, 2025

Getting started with Oracle Database CI/CD & SQLcl Projects

May 5, 2025

SQLcl Projects: Automating Oracle Database app deployments

May 5, 2025

7 Comments

  1. Gino Talamini 3 months ago Reply

    Thank you so much for this information. Just what I was looking for! CoPilot hasn’t found this page yet. 😀

    Trying to move from the app to the plugin in VS Code but it comes with some struggles now and then. 😉

    I tried to use “DD-MM-YYYY HH24:MI:SS.FF3” but I saw that the FF3 doesn’t work (yet). It now dispays 2025-02-27 10:28:09.FF3. Or should I use a different format in VS Code for greater accuracy?

    • thatjeffsmith Post Author 3 months ago

      Hammer, I’ll check that format for you, they should all work.

      Stay tuned on AI assistance features 🙂

  2. Muna 1 year ago Reply

    Jeff, does this extension support 10g database dbms output ? sql developer had this issue due to jdeveloper limitation (i read it somewher). Another question is do you plan on retaining pin query results, this was a very good feature.

    • thatjeffsmith Post Author 1 year ago

      None of our products support 10g, that’s a dead platform.

      And yes, pinning of results, I think will come.

  3. Jean-François Brodeur 1 year ago Reply

    Thanks for your generous comments that are always helpful, mind you the startup script parameter breaks the run in SQLcl. SQLcl starts in the terminal windows but no longer executes the login.sql script, removing the parameter value fixes SQLcl no longer running the login.sql, I already created a post in the extension forum.

    • thatjeffsmith Post Author 1 year ago

      Breaks? Ok, I’ll head to the forums in a bit.

    • thatjeffsmith Post Author 1 year ago

      I found multiple issues here, thanks for your comment here and thread on the forums!

Write A Comment Cancel Reply

  • Search this site
  • Don’t miss a single post! Enter e-mail to subscribe.
  • Mostly Making Oracle Easy, Mostly

    Privacy Policy 

  • X (Twitter)
  • YouTube
  • LinkedIn
  • Try our new SQL Developer Extension for VS Code
  • Developer Tools Message Boards

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle. © Jeff Smith and ThatJeffSmith, 2025

Top
ThatJeffSmith