Forum Replies Created

Viewing 15 posts - 41,326 through 41,340 (of 49,552 total)

  • RE: Backup Log With Truncate Only?

    andy.dicken (1/29/2009)


    I guess the correct command to use is a simple DBCC SHRINKFILE ('filename', ) command?

    No. Truncate removes inactive log records but doesn't change the size of the file. Shrink...

    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: UPDATE STATISTICS Gets Error "Out-Dated Page" in tempdb

    Looks like a stale read or a lost write, usually caused by a mis-behaving disk cache. Check your hardware, see if there are any errors in any logs

    I don't 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: Problem with if condition

    baumgaertner (1/29/2009)


    Unfortunately this doesn't work:

    Here the code:

    if (select nDbSubVersion from tblVersion) = 2

    begin

    alter table tblCustAttrDefValue add strHelpValue varchar(200) null

    end

    go

    if (select nDbSubVersion from tblVersion) = 2

    begin

    ...

    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: Problem with if condition

    baumgaertner (1/29/2009)


    Can you describe it?

    The way you had it in your last post. Two ifs with a GO in between.

    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: Problem with if condition

    baumgaertner (1/29/2009)


    What do you mean by dynamic SQL?

    I hope not "EXEC".

    Yes. (or sp_executesql, same thing)

    It's that, or break the batch using GO. Your choice.

    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: Problem with if condition

    Thought I remembered this: http://www.sqlservercentral.com/Forums/FindPost613599.aspx

    Matt's advice (the last post of that thread) is good. Use dynamic 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: Problem with if condition

    baumgaertner (1/29/2009)


    Is there any chance to suppress this syntax error?

    No.

    Do you have a workaround?

    Why do you have an if block that will never be executed in the first place? 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
  • RE: Problem with if condition

    You're confusing compile-time errors and run-time errors.

    At compile time, the entire batch is checked for valid syntax and valid objects. If there's anything wrong, a syntax error is generated. This...

    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: Page Inconsistency

    amit (1/29/2009)


    I dnt know if the following existing.. just curious.. is there any dbcc checkdb with no_data_loss....

    Yes. It's the REPAIR_REBUILD option. It only fixes things is all of the corruption...

    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: Consistency errors - how hosed am I?

    Matt Cherwin (1/28/2009)


    The one bright side to this is it helps support my position that all SQL Server instances in the firm should at least fall under my purview 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: Are the posted questions getting worse?

    Steve Jones - Editor (1/28/2009)


    I leave for lunch, 98 pages of answers

    come back, 102.

    You need to take shorter lunch breaks. 😀

    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: Keeping user database in memory

    LCAD (1/28/2009)


    What would be THE cheapest query I can run on a table to get the desired effect?

    SELECT * FROM TableName

    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: Page Inconsistency

    amit (1/28/2009)


    Note that i can afford to lose data on the database. It contains essential info.

    Do you have a clean backup? One without the corruption?

    If you do, then you can...

    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: lock

    Why don't you use temp tables? Then there's no worries about locking (only your process has access) and you don't need to worry about dynamic names.

    In the future, please post...

    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: clustered index and non clustered index

    I'm not sure what you're asking. Could you give more detail please?

    Are you asking for the reasons why we might create a clustered index or a nonclustered index?

    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 - 41,326 through 41,340 (of 49,552 total)