tags:

views:

47

answers:

1

I have an already existing stored procedure. But when I am trying to create the stored procedure with a new name it hangs up the server. But If I execute the same with its usuall name it works fine. Any idea whats going wrong. Why the newly created one is taking too much time

Script is fine. As with original one it works perfectly but As I copied the script to new it started hanging the server.

A: 

If the stored procedure is lengthy or your server is heavily loaded, it might take a while to create. Give it a few minutes, just to be sure.

Perhaps a buggy or poorly performing DDL (Data Definition Language) trigger is defined on the database. It might be doing something different in the different cases you mention. You can find DDL triggers under Programmability, Database Triggers for the database.

You might try to see if this happens with all stored procedures that you try to clone in this way or only the particular stored procedure that you mention.

The last thing I can think of is that the system tables could be corrupt. Run a CHECKDB.

binarycoder