• Gianluca Sartori (9/4/2012)


    WayneS (9/4/2012)


    Gianluca,

    I think I've run across the same limitation, and I've been revamping this script from being process-based to being lock-based. I wanted to add the intra-query parallel processing items, and was having trouble.

    I posted a newer script over the weekend, and thanks to Mark's code below, it looks like I'll be having a newer version yet soon.

    Thanks for the update!

    If you look at the code I posted, you'll see that I used the same technique as Mark. It's incredibly useful when you have to work with multiple nodes at once.

    Another thing that I added is the object name lookup on sys.partitions on the originating database.

    I was planning to blog it, but I'd be happy to help you with your post instead.

    I didn't catch that - neat idea. I don't think I want to include it in my script though, since I use this when I don't have access to the database. If you blog it, I'll link to it.

    Did you see the change I made where it is based off of the locks instead of the process? What do you think of that?

    Edit: I will include the dbid and associatedObjectId though.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2