Excel crashes when calling SQL Server stored procedure

Hi all,

I have a scenario when suddenly Excel 2013 crashes when trying to get data from stored procedure. Here are the steps that I used to fetch the data:

1. In a blank Excel file, getting data from external source (Data -> From other sources -> From Microsoft Query)
2. Establishing connection to the server and database, using "SQL Server" driver
3. Calling procedure into the MS Query window (procedure requests two date parameters which were given in the call)
4. Procedure returns data to the query window
5. In the query window, clicking on File -> Return data to Excel, Excel crashes

Other stored procedures are working fine but this one is really causing us problems. Here is what is different in this stored procedure:

  • It uses CTE - Common Table Expressions in TSQL
  • It uses SET NOCOUNT ON at the begining and SET NOCOUNT OFF at the end of the procedure
  • It returns 160 columns
  • It does not use temp tables

Thank you!

April 16th, 2015 7:50am

Hi,

To better assist you on this issue, could you help me with some questions below:

  1. Was this stored procedure working before or this was the first time of set-up?
  2. Are you using the same workbook to connect all your stored procedure?
  3. Have you compared the execution time on the SQL server side of those procedure which working and this one?
  4. Have you check if there any information logged in Event log locally and the SQL server side? Like timeouts?

Before giving any suggestions, I may also need a dump file to narrow down the causes. You can refer to this article for creating dump file (Better not to save the dump file on C:\). Please mail the dump file to: ibsofc@microsoft.com and keep the thread url or tittle as the subject of the mail.

Free Windows Admin Tool Kit Click here and download it now
April 20th, 2015 2:20am

Hi,

  1.  This is a first time of set-up
  2. No. This workbook connects only to this stored procedure
  3. Execution time is <10 seconds
  4. Local Event Viewer tracked the application error and there is an information in .wer file. But I haven't seen anything that looks like a lead..

I tried to create crash dump from Task Manager but produces 700MB file?! I don't understand how to use app from the link you provided.

April 22nd, 2015 7:52am

Hi,

If this is the first time of set-up, could you please try to create a new connection for this Stored procedure through ODBC Data Source Administrator?

For the dump file, you can create a shared path like in Onedrive and mail me the path. I can download from there for analyzing.

Thanks.

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 7:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics