• hi ,

    please check below link..

    http://blog.sqlauthority.com/2007/10/19/sql-server-types-of-dbcc-commands-when-used-as-database-console-commands/

    in this commands,most frequetly used command are

    DBCC INPUTBUFFER(Spid) to get query

    DBCC shrinkfile(file_id ,size) to shrink file