简体   繁体   中英

What environmental variables can affect the successful execution of a stored procedure?

Where the environment is either a sproc called via an ASP.NET Website or directly from within SQL management studio.

I have developed a copy routine which copies a hierarchy (of folders and files for example) from a specified source to a specified destination. I have implemeted this using both a recursive solution (ie using nested stored proc calls) and an alternative which flattens the hierarchy of folders and files, firstly, and then - by way of a lookup - reasserts the hierarchy during copying to its destination.

When the copy routine (in both its incarnations) is executed from within SSMS, it works absolutely perfectly and the copying is completely successful. However, when invoked from within the ASP.Net Website, copying occurs only to a certain depth and then stops. No errors are returned and no exceptions are thrown. Logging indicates that copying stops at the same time and same depth for both incarnations of the sproc, when it fails.

Is there an issue with a transaction scope, buffer issues, asserting allowable execution times, LINQ to SQL limitiations or cached execution plans

Any help would be greatly appreciated.

In providing a broad answer. The fact that isolating L2S and calling the sproc directly via ADO.NET api, provided a working solution and in so doing, highlighted at least one variable which can affect the succesful execution of a stored proc. Jon C deserve some plaudits here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM