Home Forums SQL Server 2005 Development need script to generate load on tempdb databse!!! RE: need script to generate load on tempdb databse!!!

  • sanketahir1985 (2/1/2010)


    Hi friends

    can any buddy provide script to generate load on tempdb database in sql 2005.

    Heh... generate a load? Shoot... run one or two of the following... this will stress TempDB and it's log file to the max...

    USE TempDB;

    GO

    SELECT TOP 1000000000

    IDENTITY(INT,1,1) AS RowNum

    INTO #StressTempDB

    FROM Master.sys.All_Columns ac1,

    Master.sys.All_Columns ac2,

    Master.sys.All_Columns ac3;

    GO

    I guarantee that it will "generate a load on TempDB".

    --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)