Forum Replies Created

Viewing 15 posts - 16,036 through 16,050 (of 49,552 total)

  • RE: Index on View having some repeated rows in sql server 2008r2

    Why do you want an indexed view anyway?

    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: Log file Management

    Nothing to do with checkpoint.

    If you don't defined explicit transactions, then each and every data modification statement is wrapped in its own transaction which is automatically committed upon completion.

    So let's...

    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: Restore database

    Get a backup that does have those procedures in and restore it as a new DB. Copy the procs 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: truncate table

    kapil_kk (10/18/2012)


    I think after disabling constraint of both tables truncate should work..

    No, it shouldn't. Disabled constraint is still a constraint. For a truncate the table must not be referenced by...

    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: Shrinking Transaction Log File "the right way"

    MWise (10/17/2012)


    Side note: I just assumed that all articles on here would be peer reviewed prior to publishing. Is that not true?

    Steve edits them, don't know what his...

    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: Logic problem in "SET [Quantity_Remaining] = [Quantity_Remaining] - 1"

    That's probably why. The first trigger does the insert into Bulk Purchases, but since nested triggers aren't on, the trigger on that table won't fire.

    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?

    dwain.c (10/17/2012)


    Jeff Moden (10/17/2012)


    Sean Lange (10/17/2012)


    Jeff Moden (10/16/2012)


    Wow... recent interview of a Web Developer interviewee just set a new record. Interviewee claimed 14 years experience in SQL (mostly Oracle)...

    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: Question regarding TempDB

    http://www.sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-%281230%29-tempdb-should-always-have-one-data-file-per-processor-core.aspx

    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: Logic problem in "SET [Quantity_Remaining] = [Quantity_Remaining] - 1"

    Do you have nested triggers enabled?

    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: While Loop SQL Query Help......

    Why do you need a while loop?

    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: Question regarding TempDB

    1 is not a solution. It's a mitigation, nothing more and it's not a particularly good one. No, it is not a commonly employed 'solution' to restart SQL often 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: Logic problem in "SET [Quantity_Remaining] = [Quantity_Remaining] - 1"

    Define 'fails'. Throws an error, does nothing, converts the server into a black hole which sucks down the entire server room, something else?

    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: Logic problem in "SET [Quantity_Remaining] = [Quantity_Remaining] - 1"

    briancampbellmcad (10/17/2012)


    CREATE TRIGGER [dbo].[trDecrementBulkPurchases]

    ON [dbo].[tblTransactions]

    AFTER INSERT

    AS

    BEGIN

    UPDATE tblBulkPurchases

    SET [Quantity_Remaining] = [Quantity_Remaining] - 1

    WHERE Transaction_Type = 'From Bulk Assignment'

    and tblBulkPurchases.PO_Number in (SELECT PO_Number FROM INSERTED)

    END

    GO

    That looks better, as long...

    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: SELECT fields with a space in the name

    SELECT [column name with spaces in it] AS SensibleAlias FROM table

    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: Logic problem in "SET [Quantity_Remaining] = [Quantity_Remaining] - 1"

    briancampbellmcad (10/17/2012)


    I'm assuming these lines below are OK so far per your (?):

    CREATE TRIGGER [dbo].[trDecrementBulkPurchases]

    ON [dbo].[tblTransactions] -- the trigger is on an INSERT event 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

Viewing 15 posts - 16,036 through 16,050 (of 49,552 total)