Forum Replies Created

Viewing 15 posts - 10,996 through 11,010 (of 49,552 total)

  • RE: Proc with input paramaters does not compile

    Is your 2012 instance case sensitive perhaps? If it is, that may be a cause. There's different capitalisation of the variables in different places and would explain why it's fine...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Proc with input paramaters does not compile

    Parses fine on my 2012 instance. Can't run it without the tables, but it parses fine.

    Since you changed the variable names when you pasted the errors, I can't try to...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Proc with input paramaters does not compile

    Express12 (11/11/2013)


    Sample ERRORS I'm receiving during COMPILE.

    Msg 137, Level 15, State 2, Procedure sp_MyProc, Line 195

    Must declare the scalar variable "@myVar_1".

    Msg 137, Level 15, State 2, Procedure sp_MyProc, Line...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Proc with input paramaters does not compile

    Without seeing the entire of the procedure, absolutely no way to answer that. The error message would also be useful.

    You are missing a comma in the EXEC statement after the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Craeting DR in sql 2012 standarad version for priamry server 2005 enterprise sp4

    You should be able to do that. The usual testing is required for upgrading of course.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Behaviour of CONVERT with GETDATE() !!!

    Convert allows an explicit format to be specified. If you don't specify one, you get the default format, which is "mon dd yyyy hh:miAM" (as per BoL). If you want...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Index creation help

    No, those are CPU times, number of IOs and execution times. Costs are what the optimiser calculates, what you see in query plans.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: use cte instesd of while and temp table

    A CTE is just a named subquery, it's not a table, it has no storage, it is only in scope for the immediate next statement.

    I can't see anywhere obvious...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Index creation help

    Bhuvnesh (11/11/2013)


    Lynn Pettis (11/11/2013)


    The cost values you see in the execution plan are basically arbitrary values.

    Does this the same case with profiler trace stats too?

    Profiler trace doesn't show optimiser...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Execution Plan sugested creating nonclustered index

    a20213 (11/11/2013)


    No!

    So, what should i do when i see this kind of advices, should i just ignore it ?

    No, it's useful as a place to start when you're tuning...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: T-SQL Performance tuning on Aggregates

    d_uvarajan (11/11/2013)


    As requested attached the "Actual Execution Plan".

    Attached where?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Execution Plan sugested creating nonclustered index

    a20213 (11/11/2013)


    it's good to follow the advice and create every NONCLUSTERED INDEX suggested ?

    No!

    Also, i have seen this after the declaration of a table

    CREATE UNIQUE INDEX idx_user_end_id ON dbo.Sessions(username, endtime,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Behaviour of CONVERT with GETDATE() !!!

    select CONVERT(DATETIME, CONVERT(VARCHAR(10), getdate()))

    --'Conversion failed when converting date and/or time from character string.'

    In this one you're trying to convert from a datetime to a varchar and back to a datetime,...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: One Log Writer per instance?

    The log writer process is not the process that writes logging records to disk. User processes do that. Hence why you see user processes with WRITELOG waits (a wait for...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Curiosity on performance increase

    kreierson (11/8/2013)


    GilaMonster,

    Thanks for your reply. I am very new at trying to decipher execution plans, so if you had any recommendations on a good website or book it would be...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 10,996 through 11,010 (of 49,552 total)