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.

thatjeffsmith
Author

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

4 Comments

  1. I expect the question was asked by someone executing a large files by @file_name.sql.

    I know I just did this – the file was too large to open in sql developer. I’d exported the file using sql developer. It appears to be executing fine 3 hours later but it would be nice to get an idea an idea on how far it had gone and how much further it had to go till it finished!

    Maybe in a future update….

    • thatjeffsmith

      Probably best way is to print status messages yourself, add checkpoints to your script, otherwise I usually check in the DB to see how many rows are in my table – most big scripts like this are INSERTs or some variant…

  2. 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

    • thatjeffsmith

      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.

Write A Comment