Forum Replies Created

Viewing 15 posts - 3,766 through 3,780 (of 49,552 total)

  • RE: Error in statement time > X

    It won't run, because you're referencing an alias in the WHERE clause. Aliases only get assigned at a point after the WHERE has run.

    You could do

    SELECT change_dtim,create_dtim,ckpt_id,Format([change_dtim]-[create_dtim],'hh:nn:ss') as tempo FROM...

    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 figure out whether data is selected from dirty pages?

    Eric M Russell (1/22/2016)


    GilaMonster (1/22/2016)


    Eric M Russell (1/22/2016)


    A dirty page is simply a page that been written to during an active (ie: uncommitted) transaction.

    Or a committed transaction. It's a page...

    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: usp stored procedure prefix

    Jeff Moden (1/22/2016)


    I'm saying that it's no good for me and I won't have it in my shop.

    Seconded.

    I did a long project at a company that mandated usp_...

    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: RECREATE AN ID OF A ROW AFTER BEING DELETED

    abdellahmoh2016 (1/22/2016)


    It's because my boss suggested me simple like that

    Then I would suggest that you suggest to your boss that this is a bad idea, overly complicated, makes auditing hell...

    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 figure out whether data is selected from dirty pages?

    Eric M Russell (1/22/2016)


    A dirty page is simply a page that been written to during an active (ie: uncommitted) transaction.

    Or a committed transaction. It's a page that has been modified...

    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: SQL Server 2008 - DB troubleshooting - need peer review

    Oh, and if you used the Profiler GUI against the server, you could well have caused the crash. Wouldn't be the first time.

    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: Script to create Triggers

    Look at the length of each of the character columns, and the length of each field you're inserting into. One is too short, you need to investigate and see which...

    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: SQL Server 2008 - DB troubleshooting - need peer review

    You have a lot of wait types there that are meaningless or expected. Look for one of Glenn Berry's wait scripts and use that.

    The totals are also very hard 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: Script to create Triggers

    Somewhere you're trying to insert into a column that's too small.

    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 figure out whether data is selected from dirty pages?

    SQL Guy 1 (1/22/2016)


    They agreed with second option, but with condition that the "dirty" records will be marked somehow in the report. So they conditionally accept it.

    Nice idea, but...

    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 figure out whether data is selected from dirty pages?

    Is there some reason you've decided not to use read committed snapshot or snapshot isolation?

    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: Restricting users from creating nvarchar columns

    You can use a DDL trigger, but if they've got dbo rights or above, they can disable the trigger.

    This is something that probably needs to be taken up with 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: Duplicate key error

    Because for procedures, the lookup for the plans in cache is database_id, object_id and some of the SET options.

    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: 'SA' mappings...

    Personally I prefer making the database owner 'sa'. It can't cause an inadvertent privilege increase, since sa is sysadmin always, it can't cause problems as will happen if a domain...

    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: Are the posted questions getting worse?

    Grant Fritchey (1/21/2016)


    Hugo Kornelis (1/21/2016)


    Though I am happy to hear that he feels that he has heard enough to be able to solve it, I am at the same time...

    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 - 3,766 through 3,780 (of 49,552 total)