Forum Replies Created

Viewing 15 posts - 5,176 through 5,190 (of 49,552 total)

  • RE: i want to convert a division of int result into decimal

    rajemessage 14195 (7/27/2015)


    I got the point,

    q1) that means if population is going to be whole number with out fraction.

    that is converting using cast( '323' as decimal ) is write, because...

    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?

    jasona.work (7/27/2015)


    And I just realized that until we get a TLog backup, it's in "pseudo simple" mode, ain't it...

    No. Until a full or diff runs.

    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 Login Mode Issue

    SQL's not going to change the setting automatically. Windows updates aren't. That leaves someone changing it or some job or application you have that's changing it.

    The setting only takes...

    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 Login Mode Issue

    Someone's changing it, or a job is changing it. Since the setting only takes effect at restart, you see it after a windows restart. Ask the people with administrator access...

    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: non trusted constraints vs performance

    andrew gothard (7/27/2015)


    GilaMonster (7/27/2015)


    For whatever reason (probably bad data), they've just created them WITH NOCHECK. It's not going to cause performance problems.

    Never? What if one of the untrusted constraints...

    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: non trusted constraints vs performance

    For whatever reason (probably bad data), they've just created them WITH NOCHECK. It's not going to cause performance problems.

    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: Primary filegroup for system objects, secondary for data)

    The advantage is that, if you're in full recovery model and know how to do piecemeal restores, you can restore primary very, very fast (it's only the system tables) and...

    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: i want to convert a division of int result into decimal

    Always specify your required precision or length. The default isn't 0, the default is DECIMAL(38,18), which is huge.

    Cast either (or both) the numerator and denominator to DECIMAL of the required...

    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 trap <= 10 seviarity llevel error.

    You'll need profiler or preferably extended events. You could probably do it with agent alerts as well, but I wouldn't recommend it. The volume of email will be spectacular.

    Messages with...

    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: Preallocate locks a good idea?

    To be honest, that whole section on locks looks questionable.

    The recommended practice for SQL Server is to leave that setting at default (https://msdn.microsoft.com/en-us/library/bb402936.aspx). It's checked by one of 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 Index...or am I missing something?

    lptech (7/24/2015)


    Try monitoring sys.dm_db_index_usage_stats for a while. Should tell you if the indexes are used often enough to keep them around..

    When you have duplicate indexes, all of them will show...

    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 insert from Table 1 to Table 2 only if record doesn't exist in Table 2.

    INSERT INTO vacationaccrual

    (empno,

    accrued_vacation,

    accrued_sick_effective_date,

    ...

    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: Help selecting records not between 2 dates

    I need to count the machine only once, in the first month that it was serviced and ignore it from then on for that year. Any other services are...

    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: Preallocate locks a good idea?

    Preallocate the what????

    If he's talking about the 'locks' server config setting, tell him to keep his hands off it unless he can explain exactly what it does (limit the maximum...

    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: A stored procedure that usually runs fast ran for a long time yesterday

    You can get the actual plan from when the application runs it with a server-side trace. You can run it manually within a transaction and roll it back, make sure...

    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 - 5,176 through 5,190 (of 49,552 total)