Unable to alter view

  • I have a view that I cannot make changes to.

    I just open the view in a query window make a change and then say run and it never comes back.

    I can make other views and make changes to other views - but for some reason I can't do it for this view.

    Anything that would cause it not to work.

    I can't just open it and run it without making changes.

    I can select using the view fine. Comes back right away.

    Thanks,

    Tom

  • I was able to resolve the issue by killing all queries open to the database and shutting down SSMS, when I came back - it worked fine. Before just bringing the SSMS down didn't solve the issue.

    It was only one view that had the problem. So I don't know why it was locking up.

    Thanks,

    Tom

  • If you hit the issue again, I'd look for blocked processes. It's likely that you had one that was preventing your from completing what you were doing. You could have identified it pretty quickly. To look for those use sys.dm_exec_requests.

    "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

  • tshad (10/10/2013)


    I was able to resolve the issue by killing all queries open to the database and shutting down SSMS, when I came back - it worked fine. Before just bringing the SSMS down didn't solve the issue.

    It was only one view that had the problem. So I don't know why it was locking up.

    Thanks,

    Tom

    If that's true, then you may have a much larger problem... something was keeping the view open in a long winded transaction. You should try this again, find out what is causing the blocking, and fix it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 4 posts - 1 through 3 (of 3 total)

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