Hi all,
I have written a series of stored procedures intended to process a large amount of data and have errors that I now feel that I have fixed.
However due to the insanely large amount of processing conducted the process takes a very long time to run fully (around 13 million update statements). I just want to ask if my assumptions are correct before I waste a large amount of time running it again.
The main stored procedure works as follows.
Start
Cursor while loop
Execute stored procedure 1
Execute stored procedure 2
Execute stored procedure 3
End of cursor while loop
End
Each stored procedure has at least one cursor inside it.
My first error occurs as I forgot to create a function required by stored procedure 1 on the test server - this has been resolved. All of the processing in this function occurs within a cursor named cli_cursor.
The second error occurred during stored procedure 2 which also has a cursor named cli_cursor - the error stated that cli_cursor already existed.
Am I correct assuming that when the first stored procedure fails due to the missing function that this cursor is left open causing the cursor in my second stored procedure to throw an error as it already exists?
If I could just get a yes from somebody then it would give me enough confidence to try the long drawn out test again.
However if my assumption is incorrect then does anyone have any advice on the quickest way to diagnose what the real problem is?
Thanks in advance for any help anyone can give.
Normm.
I have written a series of stored procedures intended to process a large amount of data and have errors that I now feel that I have fixed.
However due to the insanely large amount of processing conducted the process takes a very long time to run fully (around 13 million update statements). I just want to ask if my assumptions are correct before I waste a large amount of time running it again.
The main stored procedure works as follows.
Start
Cursor while loop
Execute stored procedure 1
Execute stored procedure 2
Execute stored procedure 3
End of cursor while loop
End
Each stored procedure has at least one cursor inside it.
My first error occurs as I forgot to create a function required by stored procedure 1 on the test server - this has been resolved. All of the processing in this function occurs within a cursor named cli_cursor.
The second error occurred during stored procedure 2 which also has a cursor named cli_cursor - the error stated that cli_cursor already existed.
Am I correct assuming that when the first stored procedure fails due to the missing function that this cursor is left open causing the cursor in my second stored procedure to throw an error as it already exists?
If I could just get a yes from somebody then it would give me enough confidence to try the long drawn out test again.
However if my assumption is incorrect then does anyone have any advice on the quickest way to diagnose what the real problem is?
Thanks in advance for any help anyone can give.
Normm.