Forum Replies Created

Viewing 15 posts - 19,936 through 19,950 (of 49,552 total)

  • RE: Insert Trigger Help

    If the trigger needs to fire after a row is added to customer, it's an insert trigger, if fires after an insert operation. An update trigger fires after a row...

    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: High response times and queue lenthing duringlog back up

    The thing here is that there's not much that can cause very slow disk response other than the hardware. Doesn't have to be faulty, just slow or overused or incorrectly...

    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: Do database-file-internals / data-page-structures differ depending on upgrade method?

    Kennedy.Parker (3/3/2012)


    Do we gain any internal file structure/page structure benefit by doing a schema-rebuild/data-import vs the other methods?

    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: High response times and queue lenthing duringlog back up

    500 000+ rows for each DB?????

    That's seriously bad. Find Kimberly Tripp's article on transaction log throughput and read 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: Insert Trigger Help

    Well you can't pass an ID to a trigger, and pulling an ID out of the inserted table into a variable is a common error when writing triggers as 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: Insert Trigger Help

    Which part of the rough sample code that I posted don't you understand?

    Forget about passing customerIDs around, that's not how triggers work. The rough code I posted would be 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: Insert Trigger Help

    Please look at the rough code I gave you. I didn't use Insert .. values anywhere.

    If you are writing a trigger to log inserted rows into another table you cannot...

    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: Insert Trigger Help

    See my previous post, specifically

    Typically, if you want to create a logging trigger, it will look something like the following.

    CREATE TRIGGER....

    AS

    INSERT INTO <logging table name> (<columns to insert>)

    SELECT <columns> from...

    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: Insert Trigger Help

    lfc8ynwa (3/3/2012)


    DECLARE @CustomerID int

    Select @CustomerID = CustomerID From inserted

    The first problem is that you are assuming there will only ever be one row inserted at a time. What's going 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: Why we cannot put transaction log file in a FileGroup?

    Filegroups group data files together for the purpose of table storage. Log files don't store tables or indexes, so they can't logically be part of a filegroup

    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: Read Committed Isolation Level

    Not just because of the isolation level. Read committed releases the shared locks on rows read after the read completes, but also read locks are shared, so two sessions 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: What is difference between FOR trigger and AFTER trigger?

    None whatsoever.

    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: Time out expired when i execute stored procedure.

    Please post new questions in a new thread. This is not a single problem with a single solution.

    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 many ways are there to define a "statement_block"?

    It's like with a procedure.

    CREATE PROCEDURE ... doesn't define a statement block, but this prints out all the print statements

    CREATE PROCEDURE Talkative AS

    Print '1'

    Print '2'

    print '3'

    GO

    DECLARE@MyIntINT = 1

    IF@MyInt = 1

    ...

    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: High response times and queue lenthing duringlog back up

    Investigate the poor throughput and high latency on the log drive. If that's a SAN, look at the SAN diagnostics, check the switch usage stats, etc.

    Also maybe check your 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

Viewing 15 posts - 19,936 through 19,950 (of 49,552 total)