I have been asked to look into a problem one of our partner groups is having with a set of SQL procedures. I have run out of ideas and was hoping someone here might think of something, as I am not a DBA and don't have the depth of knowledge many of you do.
Situation:
A set of procedures exists that imports data from our ERP database to our WMS database (Parts, PO's, etc). Both of the databases were running on 2000, but they have decided that as part of an ERP upgrade that the new database will be running on 2005. During testing last week they determined that 3 critical jobs were failing. On executing the stored procedures manually they found them to run endlessly, with no output to the messages queue and no failure.
For the sake of this post I will call the 2000 WMS DB "W2000" and the link for the 2005 ERP DB "E2005". You don't want to see what it actually got named...
Proc:
This is a small portion of one procedure that sits on "W2000". We have pinpointed it as the portion that causes the failure for this procedure.
Troubleshooting Steps:
- Executing any individual portion of this procedure works.
- Highlighting the 'exec' and running it manually works in a second or less. (see below for running exec and insert into)
- Temp table fields are the exact same as the fields returned by the stored procedure
- Permissions for the link apparently are all mapped to use the remote "sa" account (which pleases me so much) so I do not believe permissions to be an issue
I moved this portion of the procedure (and added a drop) to a separate window. I then added print outputs before and after each piece. When executing there are no messages in the output, just the same behavior of endlessly grinding (same in 2000 Enterprise Mangler + 2005 Studio). Any time the INSERT INTO...EXEC... section is included the system exhibits this behavior.
Canceling in Mangler or Studio does not work.
The remote stored procedure this example calls on the linked server is a very simple SELECT statement with no logic or additional calls in it.
The other two failing procedures are more complex and have a great deal of logic built into them (which is why I chose this one to use in the post).
I have tried searching both this forum and Google, but have not found anything that has helped. Please let me know if I can provide any more information or if anyone has ideas on additional troubleshooting steps. I cannot recall all of the things I have tried, but I am perfectly willing to retry anything if it will provide more information.
Thanks,
-T

Situation:
A set of procedures exists that imports data from our ERP database to our WMS database (Parts, PO's, etc). Both of the databases were running on 2000, but they have decided that as part of an ERP upgrade that the new database will be running on 2005. During testing last week they determined that 3 critical jobs were failing. On executing the stored procedures manually they found them to run endlessly, with no output to the messages queue and no failure.
For the sake of this post I will call the 2000 WMS DB "W2000" and the link for the 2005 ERP DB "E2005". You don't want to see what it actually got named...
Proc:
This is a small portion of one procedure that sits on "W2000". We have pinpointed it as the portion that causes the failure for this procedure.
Code:
create table #tmpParts (
Part_Number varchar(20) not null,
Part_Description varchar(30) not null,
Part_Type varchar(20) null,
UOM varchar(10)null ,
StorageClass int null,
Conversion_Factor_To_EA decimal(10,5) null
)
/*GET Part Numbers*/
insert into #tmpParts
exec E2005.ERP_DB.dbo.SP_Part_Export
Troubleshooting Steps:
- Executing any individual portion of this procedure works.
- Highlighting the 'exec' and running it manually works in a second or less. (see below for running exec and insert into)
- Temp table fields are the exact same as the fields returned by the stored procedure
- Permissions for the link apparently are all mapped to use the remote "sa" account (which pleases me so much) so I do not believe permissions to be an issue
I moved this portion of the procedure (and added a drop) to a separate window. I then added print outputs before and after each piece. When executing there are no messages in the output, just the same behavior of endlessly grinding (same in 2000 Enterprise Mangler + 2005 Studio). Any time the INSERT INTO...EXEC... section is included the system exhibits this behavior.
Canceling in Mangler or Studio does not work.
The remote stored procedure this example calls on the linked server is a very simple SELECT statement with no logic or additional calls in it.
The other two failing procedures are more complex and have a great deal of logic built into them (which is why I chose this one to use in the post).
I have tried searching both this forum and Google, but have not found anything that has helped. Please let me know if I can provide any more information or if anyone has ideas on additional troubleshooting steps. I cannot recall all of the things I have tried, but I am perfectly willing to retry anything if it will provide more information.
Thanks,
-T
