Forum Replies Created

Viewing 15 posts - 23,401 through 23,415 (of 49,552 total)

  • RE: Are the posted questions getting worse?

    LutzM (9/20/2011)


    We just need to be careful: once we're short on apostrophes, quite a few letters (including the "blank") will be in highe demand, too. (It's vs. it is not,...

    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: Why is my transaction automatically rolled back?

    Welcome to the wackiness that is SQL error handling. This is pretty much the sole case where a statement fails, the connection remains open and the transaction rolls back.

    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 help getting first value in a column

    n_parker (9/20/2011)


    First would be based on the ID and SubID fields combined

    So what makes the first one Georgia and not Texas? Same ID, same SubID

    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?

    SQLRNNR (9/20/2011)


    GSquared (9/20/2011)


    GilaMonster (9/20/2011)


    GSquared (9/20/2011)


    L' Eomot Inversé (9/20/2011)


    WayneS (9/20/2011)


    GSquared (9/20/2011)


    Of course, I'm also one of the few people I know who tries to terminate every T-SQL statement with a semicolon....

    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?

    GSquared (9/20/2011)


    L' Eomot Inversé (9/20/2011)


    WayneS (9/20/2011)


    GSquared (9/20/2011)


    Of course, I'm also one of the few people I know who tries to terminate every T-SQL statement with a semicolon. Not needed,...

    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: Someone Deleted a Table

    Nothing different.

    RESTORE DATABASE <new name> FROM DISK = <backup location>

    WITH MOVE <files to a new place>, NORECOVERY

    RESTORE LOG <new name> FROM DISK = <Backup location>

    WITH NORECOVERY

    ..

    --repeat for rest of...

    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: Someone Deleted a Table

    Restore to a new DB, restore logs, copy data over.

    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: Query maxing out 24 CPUs

    M_E_K (9/20/2011)


    You are right about the redundant predicates. Also, if I remove the second one, the query completes in no time and gives a good execution plan.

    I suspected something like...

    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: What % Fill Factor is best in this Scenario?

    I hate to say it, but Pinal is wrong. If you set 100% fill factor on a clustered index and the rows really do fill the page then any update...

    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 of UDF

    Read up on Grouping Sets (or post the information I asked for)

    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 turn off the checking if the column exists

    Yuri, your code will work fine because it doesn't explicitly reference a column that doesn't exist.

    This will fail though:

    EXEC sp_Msforeachdb

    '

    if left(''?'', 5) = ''MyDB_''

    begin

    use [?];

    if exists (select * from syscolumns...

    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: Query maxing out 24 CPUs

    Ninja's_RGR'us (9/20/2011)


    GilaMonster (9/20/2011)


    Ninja's_RGR'us (9/20/2011)


    Not 100% sure if the plan in cache has that info, I would guess it does (I don't usually use that to pull out plans).

    No, it doesn't....

    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: Query maxing out 24 CPUs

    I'd be looking at a few things:

    Widen the index [OLAP].[dbo].[W_SRVREQ_F].[W_SRVREQ_F_F10], add ACCNT_WID, SR_WID and DURATION_MINS as include columns.

    Change the where clause:

    case when T68314.[STATUS] = N'Closed' then N'RESOLVED' when T68314.[STATUS]...

    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 of UDF

    Huh?

    Please post table definitions, sample data and desired output. Read this to see the best way to post this to get quick responses.

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    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: What % Fill Factor is best in this Scenario?

    onlygoodones (9/20/2011)


    My research shoed 100% fill factor is best if u have an identity column with Clustered index.

    No usually. If the fill factor is 100% (and the rows do...

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