Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Identifying long running queries SQL server

    --Corrected.

    SELECT TOP 100 qs.total_elapsed_time / qs.execution_count / 1000000.0 AS average_seconds,

    qs.total_elapsed_time / 1000000.0 AS total_seconds, qs.execution_count,

    SUBSTRING (qt.text,qs.statement_start_offset/2, (CASE WHEN qs.statement_end_offset = -1

    THEN LEN(CONVERT(NVARCHAR(MAX), qt.text)) * 2 ELSE...

  • RE: Deleting TempDb log files

    ---checking file location

    select * from sys.database_FILES

    -- Empty the data file.

    DBCC SHRINKFILE (templog1, EMPTYFILE);

    GO

    -- Remove the data file from the database.

    ALTER DATABASE tempdb

    REMOVE FILE templog1;

    GO

Viewing 2 posts - 1 through 2 (of 2 total)