Restore fails with deadlock

  • I've never seen this one before. Restore fails at 100% with a deadlock.

    1. Backup is from SQL Server 2008 R2 (10.50.2500.0 (X64))

    2. Restore is onto SQL Server 2012 (11.0.2100.60 (X64))

    10 percent processed.

    20 percent processed.

    30 percent processed.

    40 percent processed.

    50 percent processed.

    60 percent processed.

    70 percent processed.

    80 percent processed.

    90 percent processed.

    100 percent processed.

    Processed 2873048 pages for database 'TestRestore', file 'SourceDb' on file 1.

    Processed 3 pages for database 'TestRestore', file 'SourceDb_log' on file 1.

    Msg 1205, Level 13, State 51, Line 1

    Transaction (Process ID 183) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

    Msg 3013, Level 16, State 1, Line 1

    RESTORE DATABASE is terminating abnormally.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Do you have the deadlock graph? I suspect you might be seeing a deadlock within a system table, but I can't be sure about that, just a guess.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Hi Grant,

    I ran a trace to get a deadlock graph but the xdl file is 0 Kb and I got the following message

    Failed to initializa deadlock control.

    There is an error in the XML document (1,2).

    <deadlock-list xmlns=''> was not expected.

    However there is data in the TextData column in profiler, I have attached this data. It looks like IntelliSense is causing the problem!

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • I found a workaround for now:

    1. Delete the database before restoring.

    2. Open a remote desktop session on the server and run the restore there.

    Strange.

    Edit to add: This is not consistent, it only works sometimes 🙁

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • It does look like it might be intellisense crashing the restore. Have you tried it with intellisense turned off? This is mighty strange.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • I have a number of users connected to the server so I cannot try it without Intellisense.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • Please try installing Cumulative Update #3 on the SQL Server 2012 instance. This specific problem is highlighted here:

    http://support.microsoft.com/kb/2725950

    The CU is available for download here:

    http://support.microsoft.com/kb/2723749

  • Thanks. I'll feedback as soon as it is installed on our test server.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • aaron.bertrand (8/30/2012)


    Please try installing Cumulative Update #3 on the SQL Server 2012 instance. This specific problem is highlighted here:

    http://support.microsoft.com/kb/2725950

    The CU is available for download here:

    http://support.microsoft.com/kb/2723749%5B/quote%5D

    Let's make this easier for others:

    This specific problem is highlighted here:

    http://support.microsoft.com/kb/2725950

    The CU is available for download here:

    http://support.microsoft.com/kb/2723749

  • Sorry coach, as I'm clearly labeled a "rookie" here, I didn't know URLs wouldn't automatically become clickable.

  • aaron.bertrand (8/30/2012)


    Sorry coach, as I'm clearly labeled a "rookie" here, I didn't know URLs wouldn't automatically become clickable.

    Not a problem, just making it easier for others (and myself later, once I get SQL Server 2012 DE).

  • Patch installed, all restores went through without an issue.

    Thanks.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 12 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply