Application restart

Why the application not respond?

This occur when first open the conexion to my server and after open a file .sql whit stores procedures , then the application not respond.

But, when open first the file and later open the conexion, y haven’t problems.