Monitoring Scripts as They Execute in Oracle SQL Developer

thatjeffsmith SQL Developer 2 Comments

Tell Others About This Story:

Interesting question from the forums:

I’m doing multiple Inserts on a table using a script file (.sql) in SQL Developer.
Since it has a lot of statements, I would like to check the progress of it somewhere in the application window. But I don’t see any progress of lines being displayed anywhere. The focus simply stays on in the first line.

It would be helpful if the script execution either points to the current DML line, or at least displays the ‘progress’ info e.g line 234 of 1000, in the status bar. I have no way of knowing which statement is being Inserted at a given point of time.. and it is very annoying as I’m not able to estimate when the script will complete.

Appreciate your response!

So when asking a question regarding software, it’s always important to mention what version of the software you’re using. Our user is indicating they’re not seeing the script progress as it executes – that should be working in the current version of SQL Developer. Let’s take a look and see!

Here’s a couple of animated GIFs demonstrating what you should see when executing a script, from a file or an unsaved worksheet.

current_statement1

But I want to see what’s going on from a different window!

Then make sure you open the Task Manager.

The Task Progress panel will display the current line being executed.

The Task Progress panel will display the current line being executed.

Ok, but what line am I on?!?

Look down a bit further in the editor gutter.

Here's you'll get a very close estimate to what line # your script is on.

Here’s you’ll get a very close estimate to what line # your script is on.

I say ‘very close’ because generally we can update the panel with the line number faster than we can advance the buffer and highlight a line as it executes…in this screenshot it’s off by about a half-dozen lines, but not bad for being about 12,000 statements overall.

Of course you could always use the Tools > Monitor Session screen to see what the current statement is, or do a query on your table that is having the INSERTs ran for to see what the row counts are…there’s always more than one way to do something, especially when it comes to Oracle.

Related Posts Plugin for WordPress, Blogger...
Tell Others About This Story:

Comments 2

  1. Hi!
    I’d have a suggestion for the Task Manager panel.

    As it is now, the most recent queries running are added at the bottom of the panel. After a few misstyped queries filling up the panel all you can see there is “Query result (failed)” and the active tasks are hidden beneath the pile of (now useless) notifications of failed queries.

    I would like to see the panel to list the running queries on top of the pile. Query results should be listed only for the successfull queries. Failed ones notifications should be ommited entirely.

    Thanx
    Alex

    1. thatjeffsmith Post
      Author

      It sounds like you’re running multiple statements using the Execute Statement button instead of Execute Script button. If using Script, as shown in this blog post, they Task Progress panel will only show a single task for all the queries running in said script.

Leave a Reply

Your email address will not be published. Required fields are marked *