Forum Replies Created

Viewing 15 posts - 466 through 480 (of 49,552 total)

  • RE: Error 17054 severity 16 state 1- SQL Server Automatically Restarts

    Narine M - Wednesday, January 10, 2018 3:28 AM

    SQL Server is terminating because of a system shutdown. This is an informational message...

    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: Row Over Partition

    You start a subquery on line 6, but you never end it with a bracket nor alias the subquery. That should go between rows 10 and 11.
    You'll also need...

    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: Get Index Scan Count

    Sue_H - Tuesday, January 9, 2018 7:20 AM

    GilaMonster - Tuesday, January 9, 2018 7:05 AM

    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: Get Index Scan Count

    Sue_H - Tuesday, January 9, 2018 6:44 AM

    With dm_db_index_physical_stats, specifying default, null or 0 uses the current database.

    NULL, 0 or DEFAULT...

    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: Suspect database - not urgent

    leehbi - Tuesday, January 9, 2018 3:29 AM

    The database had (Suspect) after the db name in SSMS.  After re-start it went into...

    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: Get Index Scan Count

    I'm not a site moderator.
    And I know Sue pointed it out, that's why my post was a reply to Sue

    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: Get Index Scan Count

    Sue_H - Monday, January 8, 2018 3:02 PM

    One problem with the script is that it is hard coded to use db_id...

    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: Restrict the users to take database offline and detach. send a mail notification also if anyone tried to do so.

    Your workarounds are unfortunately useless if you can't restrict permissions. Someone who wants to drop a DB can disable the trigger, drop the DB, enable the trigger and there's no...

    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: Get Index Scan Count

    You should mention in that script that it's index scans since the last time the database or SQL Server were restarted. Not over all 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: Wrong regional settings (decimal point)

    Change it via the machine's Control Panel

    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: Issue with ROW OVER partition

    jeffshelix - Monday, January 8, 2018 9:45 AM

    Thanks, but not sure how to do a sub query . . 🙁

    There's a subquery...

    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: Issue with ROW OVER partition

    Column aliases are applied after the rest of the statement has been evaluated. Hence you can't define and use a column alias in the same level of scope.

    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: STORED PROCEDURE

    The two different promotion tables are a concern in terms of DB design. You can also combine two of those IF statements into one, as what they do is identical.

    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 SQL Server

    Details?
    Migrating to a new version? A different server? The cloud? A different database engine?

    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: Suspect database - not urgent

    Few things.
    If a full log caused a suspect DB, then you've hit a bug where there was insufficient log reservation. Please report that to Microsoft with a repo 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

Viewing 15 posts - 466 through 480 (of 49,552 total)