Forum Replies Created

Viewing 15 posts - 23,671 through 23,685 (of 49,552 total)

  • RE: Creating join in a fuction

    Don't use select * , specify the column names and, if you want to include both of the ID columns or both date columns you'll need to alias them

    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: Creating join in a fuction

    Define 'not working'

    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: Auditing using Triggers

    Into what computer?

    SQL only knows what's connecting to it. If you're using an application account, then the app needs to do the auditing, not SQL.

    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 view

    Interview question?

    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: Auditing using Triggers

    GilaMonster (9/7/2011)


    se.saravanan (9/7/2011)


    Please let us know how to get the Windows user who deletes a row.

    Same way you get the windows user who has done insert, update or any other...

    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: Auditing using Triggers

    se.saravanan (9/7/2011)


    Please let us know how to get the Windows user who deletes a row.

    Same way you get the windows user who has done insert, update or any other operation....

    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: Alternative Solution ForDBCC UpdateUsage

    There are no alternatives for UpdateUsage. It's the only thing that updates the PFS page usage counters.

    Stop using sysindexes. It's deprecated and the row counts are known to be inaccurate....

    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: About Performance

    Huh? I don't even understand the question.

    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: Alternative Solution ForDBCC UpdateUsage

    Why do you need accurate sizes up to the second and why can't you use the file sizes (which are always correct)

    p.s. Patch to at least SP3, run UpdateUsage once...

    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: Foreign Key Index

    sqlzealot-81 (9/7/2011)


    As Grant suggested these are two separate . However you can think for something to get a relation...

    Select A.name,OBJECT_NAME(A.parent_object_id),key_index_id,B.type_DESC From sys.foreign_keys a

    INNER JOIN sys.indexes b oN a.parent_object_id = b.object_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: Alternative Solution ForDBCC UpdateUsage

    There are still odd cases of it up til 2005 SP3. Past that though, no.

    UpdateUsage shouldn't take long. I tested on a 5GB database - 12 seconds. Don't run it...

    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?

    Gianluca Sartori (9/7/2011)


    Can't wait to see his reply!

    He won't reply. He never does when attacked.

    Agreed. I made a few snide replies to his more vicious posts over at SQLTeam...

    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: New plan is created for every execution of stored procedure (query plan not reused)

    Also, are you seeing SP:CacheRemove and SP:CacheInsert events in Profiler?

    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: New plan is created for every execution of stored procedure (query plan not reused)

    GilaMonster (9/7/2011)


    Can you post the procedure in question?

    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: Strange SQL Server Evaluation of 0 (bit) = '' (Empty string) or even non empty string

    andy.fensham (9/7/2011)


    But if I say the following, I should not be getting records back.

    You should be, because of the conversions. CAST(' ' AS BIT) = 0

    Lets...

    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 - 23,671 through 23,685 (of 49,552 total)