Forum Replies Created

Viewing 15 posts - 151 through 165 (of 334 total)

  • RE: How To Expose Aging Metrics For Cached Query Plans?

    I have used, but don't suggest using optimizer hints.  They can bite you. 

    Good luck. Let us know how it goes.

     

  • RE: MDF missing

    You should be able to verify where the datafile should have been located by querying the sysdatabases table.  It lists the location of the primary mdf file.  Just a double...

  • RE: How To Expose Aging Metrics For Cached Query Plans?

    You could modify the first sp to call any one of 25 other sp's based on the input.  The result set would still be returning to the same calling sp. ...

  • RE: SIMPLE recovery mode not truncating tranlog

    Then schedule a job that truncates the log.  It's easy, and then your operational problems go away (at least that one).

    Tom

     

  • RE: long running tran in tempdb

    You can look at dbcc inputbuffer (spid) to see what command is running on that spid.  That's where I would start.

    Tom

  • RE: What triggers automatic proc recompilation?

    There is a recompile option on the create procedure command.  This causes the procedure to generate a new plan on every execution.

    Tom

  • RE: Table information

    Try this.

    CREATE  PROCEDURE SP_TOM_SPACEUSED (@order int)

    AS

    set nocount on

    if @order not in(0,1)

    begin

    set @order = 0

    end

    DECLARE @vcCommand nvarchar(100)

    DECLARE @vcName nvarchar(100)

    DECLARE @vcName2 nvarchar(100)

    CREATE TABLE #tmpTable (

    tblname varchar(100)

    ,vcrows  varchar(50)

    ,vcreserved varchar(50)

    ,vcdata varchar(50)

    ,index_size varchar(50)

    ,unused...

  • RE: SELECT INTO with Three UNIONed SELECTs

    Just wrap it with a select.

     

    select * into table_Name from

    (

    SELECT

              fields

    FROM

              tables

    WHERE

              conditions

    UNION

    SELECT

              fields

    FROM

              tables

    WHERE

              conditions

    UNION

    SELECT

              fields

    FROM

              tables

    WHERE

              conditions

    (

    SELECT

              fields

    FROM

              tables

    WHERE

              conditions

    UNION

    SELECT

              fields

    FROM

              tables

    WHERE

              conditions

    UNION

    SELECT

              fields

    FROM

              tables

    WHERE

              conditions

    ) A

    Tom

  • RE: Host Column Information On the Process Info Window

    I have noticed this also with Access ( also with excel ), last user or original creators name shows up as the host name of the spid.  To find out...

  • RE: Backup & Restore on remote server

    How did you create multilple primary keys on a table?  I did not think this was possible.

    Tom

  • RE: Recurring index problem

    I would look at the disk subsystem to see if any errors are being thrown on it.  A lot of times checkdb errors are thrown because of impending hardware problems.

    Tom

     

  • RE: Store database size in a table

    You can write a script using sp_spaceused.

    Tom

  • RE: Clustered Index Strategies

    My perspective is more of on index maintenance and performance.  If needed on an auto-increment/date field I tend to rebuild the indexes more often with 0 free space in the...

  • RE: SQL 2000 SP4 network packet size

    What is your network packet size set to.  Did you have it at the max.

    Tom

  • RE: What''''s a reasonable log file allocation

    Bill,

    Personally, I don't care for the maintenance plans.  I have 2 jobs that run that backup the database.  1 full and 1 transaction logs.  In the script I check for...

Viewing 15 posts - 151 through 165 (of 334 total)