How to set Isolation level for sql server queries within Excel?

Posted on 2009-02-19
Medium Priority
Last Modified: 2012-05-06

I've got an excel spreadsheet which has some 'external data' - which comes from an SQL Server database - and is set to refresh automatically. This has been working fine for a long time...

Then today - I start getting errors in the spreadsheet saying its been selected as a deadlock victim. I tracked down that the deadlock was between some info the spreadsheets query was reading - and writting that info by another process. God knows why this just started happening?

Anyway - I'm thinking that maybe somehow the spreadsheet has started using a more restrictive isolation level today? How is that stuff defined for a query within excel? Any other reasons why my excel query might suddenly start causing deadlocks?

- reddal
Question by:reddal
  • 2
  • 2

Author Comment

ID: 23690437
Here is a graph of the deadlock from SQL Profiler.

The process that is selected as the victim is just doing a select from a table - and the other table is doing a delete from the table of one row using the primary key.

Thanks for any pointers you might have as to how to approach this. Is it an isolation level issue on the client select or something different?

- reddal
LVL 30

Expert Comment

ID: 23706917
Are you just reading data into the spreadsheet? Perhaps you could set up a special user with read only rights and use that for your Excel login.

Author Comment

ID: 24049950
Problem went away on its own in the end - weird. I still don't know how to set isolation levels in Excel though...
LVL 30

Accepted Solution

nmcdermaid earned 1500 total points
ID: 24055886
There could have been an external factor which meant that the original write was taking longer than normal. (i.e. virus scanner running, data file fragmented), and this could have extended into a deadlock.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question