Import & Generate Scripts takes a long time

ducmanducman Posts: 17 New member
edited October 2, 2018 5:19PM in SQL Change Automation
I believe our DB is modestly size (not too big and not too small) so the Import & Generate Scripts takes around 5 minutes to complete (it was just one stored procedure).

I don't mind the wait. But there's no indicator that it's performing work. If I click on the Import & Generate Scripts again, I get an error (don't know the exact error) since it is currently already performing an import & generate scripts. But can we get some progress indicator and disable the import & generate script button?
Tagged:

Answers

  • way0utwestway0utwest CO, USA Posts: 301 Rose Gold 1
    I'm slightly confused, but maybe you can help. When you say modestly sized, I assume you have a number of tables, views, procs, etc. When you say the import and Generate Scripts take a long time to complete, I assume you mean that only one object changed,  so why was this taking so long?

    If that's right, the reason is that we need to build a dependency tree. You change one proc, but does that cause other issues in a chain? When we generate a script, we need to determine not only what changed, but what the potential issues are. If you're changing one procedure, that's usually all that's affected but we can't know that, especially if the change is from another client SSMS/VSCode/ADS. So we walk a tree to see what's changed and then need to compare that to the existing view to capture the change. At times generating the script is non-trivial, and it can be hard to do this accurately without doing a full compare.
  • ducmanducman Posts: 17 New member
    Again, I don't mind the wait. It's just that there are no indicator that it is processing. We have confuse developers here thinking they may have not really click "Import & Generate Scripts", so they go and click again and this causes an error since since the first click is currently processing.
  • way0utwestway0utwest CO, USA Posts: 301 Rose Gold 1
    Ah, that makes sense.

    What version of SCA do you have? I assume you see the spinning arrows when clicking Refresh, but does the cursor not go to a waiting image when the Import and Generate is clicked? I wouldn't expect that for this part of the actions. If this a large procedure? This should be a simple scripting once the change is detected.
  • ducmanducman Posts: 17 New member
    edited October 2, 2018 5:59PM
    We just modify a stored procedure and added comments in it. 

    Clicking "Refresh" shows the waiting image with the spinning arrows.

    Clicking "Import and Generate Scripts" does not show any progress indicator even though it's doing background work. Oh, it is taking some time to generate even though it's 1 procedure and it was just comments added to it.

    The SCA version: 3.0.18249.1181

  • way0utwestway0utwest CO, USA Posts: 301 Rose Gold 1
    Thanks, I'll ask about this. I've got 3.0.18 as well. The generation should be very quick
  • We have the similar issue with the "Refresh" functionality on some PCs it takes ages(10+) to refresh on the others the same project takes 15 seconds. Is there a way to turn on the verbose logging mode and try to debug SCA extention? There are no queries running in a database during that long refresh time...
Sign In or Register to comment.