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

Posted on 2009-02-19
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

    Author Comment

    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

    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

    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

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
    There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now