sql-scripts icon indicating copy to clipboard operation
sql-scripts copied to clipboard

Fixed issue where deleted tables/indexes result in failures

Open codenaked opened this issue 9 years ago • 2 comments

We encountered an issue where the script will become "stuck" if the next index to work on has been deleted, or it's associated table has been deleted.

We run the script nightly with a 2 hour time limit, so it usually takes a few days for it to process all the fragmented indexes. If during that time, we remove a table/index that was in the queue for processing then the script would stop processing.

This change attempts to skip an index if it's going to fail.

codenaked avatar May 10 '16 13:05 codenaked

Good catch. I need to tweak my regression tests to check for this condition. It's now on my TODO.

MichelleUfford avatar May 10 '16 16:05 MichelleUfford

Thanks!

codenaked avatar May 10 '16 16:05 codenaked