Forum Replies Created

Viewing 15 posts - 4,081 through 4,095 (of 49,552 total)

  • RE: Deadlock analysis

    abright (12/4/2015)


    To pinpoint the cause and change the code would prompt a lengthy QC process and the customer wants this fixed yesterday.

    The earlier you start, the sooner it'll be done

    I...

    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: Set time format in create table

    Use LEFT, SUBSTRING and RIGHT along with CHARINDEX to locate the :. Break it into the hours, minutes and seconds, then convert each fragment to int and multiple by 60...

    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: Set time format in create table

    The TIME data type stores a time of day, not a time interval. Since a day has only 24 hours, that's the max that TIME can store (well, 23:59:59.9999...).

    Time intervals...

    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: Tempdb configuration advice

    To start, there's no indication the slow IOs are caused by autogrow operations, so changing your autogrow settings is probably not indicated at this point.

    For your disks to be taking...

    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: Need some assistance on to stop a query if value = 0

    ??

    If it's a parameter, then it's passed to the batch/procedure from the app, so you would just reference the parameter name, rather than the hardcoded value that I put...

    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: How to add hours in SQL query

    That's not T-SQL.

    It is MDX? If it is, you'll need to look up the MDX date manipulation functions, they're not going to be the same as the T-SQL ones.

    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: How can i fix this log file error in tempdb?

    Yes, shrinking will reduce the size of the file. Will making the file smaller help with an error that's saying that the file need to be larger than it currently...

    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: Need some assistance on to stop a query if value = 0

    IF (SELECT p.ActivityCode FROM mission m LEFT OUTER JOIN product p ON p.extproductid = m.extproductid WHERE m.missionid = 12344) = 1

    BEGIN

    -- query to be selectively run goes here

    END

    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: How can i fix this log file error in tempdb?

    If it's full (no free space, too small for current activity), why do you think that shrinking (removing free space, making file smaller) is the solution?

    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: Need some assistance on to stop a query if value = 0

    Is the column in the mission table or product? Is it just called "trigger"?

    If it's in Product, there's a chance it could be NULL due to the outer join. If...

    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: Need some assistance on to stop a query if value = 0

    Ok, so what then, do you want to run the query and return an empty resultset? Not run the query at all?

    And ditch those NOLOCK hints!

    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: Need some assistance on to stop a query if value = 0

    Still too vague.

    What happens if there are multiple rows with trigger = 1 and multiple rows with trigger = 0?

    When should the print not happen? When all rows have trigger...

    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: Need some assistance on to stop a query if value = 0

    I meant the whole batch of code, not a single select.

    Firstly, ditch the NOLOCK hints, they're not go-faster switches, they're essentially WITH (RETURNPOTENTIALLYINCORRECTDATA) hints. If you don't mind the results...

    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: Deadlock analysis

    https://www.simple-talk.com/sql/performance/sql-server-deadlocks-by-example/

    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: Migration of a DB from SQL 2008 R2 to SQL 2012

    himanshu.sinha (12/3/2015)


    The question is what happens if we need to failback to 2008

    You can't, so make sure that all testing has been done before the upgrade day. And keep...

    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 - 4,081 through 4,095 (of 49,552 total)