• vanceprice (2/23/2012)


    I am new to TSQL.

    What would be the best way to run this sp for all user databases on a SQL 2008 server?

    Welcome to T-SQL language.

    Loop the sys.databases and use this SProc inside the loop.

    Take an example of my Index defragmentation script and Try yourself using sys.databases.

    If you face any problem open a new thread and ask your quires.We will help you.

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/