Forum Replies Created

Viewing 15 posts - 44,116 through 44,130 (of 49,552 total)

  • RE: Best Ways to Audit a Production Instance

    Are you looking to audit all data changes, or all queries run against the server?

    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: Re: Short-circuiting a query

    Grant Fritchey (9/30/2008)


    I must be regurgitating bad stuff again. Sorry. It's when it's a delimited list that it behaves like that, right?

    You mean something like this?

    select ProductID from Sales.SalesOrderDetail where...

    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: Maintanance job/Schedule jobs

    yulichka (9/30/2008)


    Transaction logs should be two seperate jobs one for system, one for user right? Thank you

    Most (if not all) of the system databases are in simple recovery model 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: Help With SQL Update Query

    What's the join between orders and orderdetails?

    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 With SQL Update Query

    Try something like this:

    UPDATE OrderDetails

    SET ShipID = LatestShipping

    from OrderDetails INNER JOIN

    (Select EEID , MAX(Shipping.ShipID)...

    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: Clustering vs. Mirroring, and Maybe Load Balancing?

    Clustering is for redundancy of the entire server, mirroring is for redundancy of individual databases. They both have their place and neither is a replacement for the other.

    Neither is a...

    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: Maintanance job/Schedule jobs

    I prefer integrity before database backup, as there's no point in backing up a corrupt database.

    Log backups shouldn't go in the same maint plan, as you need to run 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: Re: Short-circuiting a query

    Grant Fritchey (9/30/2008)


    It depends...

    IN basically is an OR statement. It's one of those hidden RBAR (row-by-agonizing-row, TM: Jeff Moden) operations because it's going to check each row of the IN...

    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 249 is the limit on NonClustered indexes?

    I think that it was a tinyint in SQL 7 or earlier. I know it was at one point.

    It's a full int in SQL 2008 (at least if you look...

    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: Standards for Stored Proc Portability

    Jason Crider (9/30/2008)


    So how would you work that in practice?

    Do you setup a standard where you say the linked server name is the same in dev and prod?

    Just so. I...

    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: CHECKPOINT killing our production box

    Checkpoint doesn't happen once a day. Do you perhaps have an agent job that kicks off around the same time?

    The frequency of the checkpoint is determined by the amount 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: Standards for Stored Proc Portability

    I'd use linked servers, ensure that the linked server name remains the same and change where it points when necessary.

    Bear in mind though, that if you use linked servers...

    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 IF Statement

    Vladan (9/30/2008)


    What you are trying is not proper SQL syntax - you have to use SET, and @ with the variables... like this:

    DECLARE @newvar varchar(8)

    IF @APRIORITY = 1 THEN

    SET...

    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 startup and Database startup

    There's a very detailed look at this in one of the chapters of the book "Practical troubleshooting: The database engine", edited by Ken Henderson. The book's well worth buying.

    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 IF Statement

    Take the THEN keyword out (as SQL does not use THEN in its if statements) and replace ELSEIF with ELSE IF and your query should work as you intend.

    Also you...

    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 - 44,116 through 44,130 (of 49,552 total)