Forum Replies Created

Viewing 15 posts - 17,611 through 17,625 (of 49,552 total)

  • RE: checkdb issues sql 2008

    Restore from backup, that's not repairable.

    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 SQLServer and Bitwise operators

    Also parameterise the call from VB, don't just concatenate a string together and execute 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: Transact Newb - What am I doing wrong?

    I would recommend no using WITH LOG, except for critical errors. Otherwise just pollutes the SQL error log (which is where it's logged to) and makes it harder for 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: Transact Newb - What am I doing wrong?

    rob.vig (7/16/2012)


    I ran your simplified statement and it ran fine. No Error reporting though

    No, there won't be any error reporting. As I said

    If I writing the code, I'd probably build...

    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 SQLServer and Bitwise operators

    Firstly let's fix your procedure. No need for dynamic SQL.

    CREATE PROCEDURE [dbo].[GetPrintersByType] (@PrinterType INT)

    AS

    SELECT <column list here> FROM parameters WHERE printer_type & @PrinterType = @PrinterType

    GO

    Not familiar enough with VB to...

    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: Transact Newb - What am I doing wrong?

    rob.vig (7/16/2012)


    How would this report the error?

    It wouldn't. That's why I said there's a lot more that can be done, but that's the core.

    If I writing the code, I'd probably...

    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: Transact Newb - What am I doing wrong?

    rob.vig (7/16/2012)


    Like I just said in my last post, I want to make 2 INSERT's and 1 DELETE. If they don't work as a batch, I want to abort 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: Transact Newb - What am I doing wrong?

    rob.vig (7/16/2012)


    Why all the "Why's"???

    Because your code is over-complex for what it appears to be doing and I'm not sure if there's a reason for it or not. As...

    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 SQLServer and Bitwise operators

    Without seeing how you're calling from VB, no.

    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: Transact Newb - What am I doing wrong?

    http://sqlinthewild.co.za/index.php/2011/05/17/on-transactions-errors-and-rollbacks/

    Also, why the SAVE TRANSACTION? Are you expecting this to be called from a nested transaction? If so, why no checks of @@TranCount? What happens to the open transaction 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: Table Lock

    Not much detail to go on...

    Put an TABLOCKX hint into the delete and do the delete and insert in a transaction.

    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 SQLServer and Bitwise operators

    A where clause predicate has to compare some expression with some other expression.

    Where Column1 > 4

    Where Column1 + Column2/Column3 = 0

    What you have there is

    Where Column1

    A single expression, no comparison....

    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: which is best method for upgrade database 650GB?

    ananda.murugesan (7/16/2012)


    New version - SQL 2K8 R2 enterprise edition with SP2.

    Sure about that? 2008 R2 SP2 has not been released, it's in CTP, and I would not suggest using 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: Transact Newb - What am I doing wrong?

    Why are you using @@Error and goto and not the TRY ... CATCH error handling?

    @@Error works, but it's more complex and easier to get wrong than try...catch

    p.s BEGIN TRANSACTION immediately...

    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: Using NoCompile

    tyson.price (7/16/2012)


    Based on it needs to be recompiled everynight I was thinking the recompile option does the same thing the nightly job does. I'm wondering if once a day...

    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 - 17,611 through 17,625 (of 49,552 total)