Forum Replies Created

Viewing 15 posts - 4,201 through 4,215 (of 7,615 total)

  • RE: Linked server query merging remote data with local - deadlock victim

    To avoid pulling the entire remote table columns over every time the query runs, you need to add an index to the remote table that will identify rows updated or...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexes

    1) No. The primary key and clustering key are not necessarily directly related. The clustering index is the single most critical factor for performance. And it should...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Ed Wagner (8/17/2016)


    Jeff Moden (8/17/2016)


    ScottPletcher (8/17/2016)


    Again, auditors would not have access to the original table.

    But they have direct access to the audit table? That doesn't make sense to me...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Loop through an integer and test the values and update with a char

    SELECT REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(

    CAST(price AS varchar(20)),

    '0', 'A'),

    '1', 'B'),

    '2', 'C'),

    --...

    ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: how to copy data from primary table and its dependencies from one id to another and then how could I remove primary table with its dependencies

    You could. Or you could change the FK rules to "CASCADE" rather than "NO ACTION" -- at least temporarily -- then just try updating the id from 1 to...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: what are some common naming conventions for sprocs?

    I prefer to name procedures first by topic area as well. I was merely pointing out that it's more common to use verb_object.

    Personally I despise a prefix that represents...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Jeff Moden (8/17/2016)


    ScottPletcher (8/17/2016)


    Jeff Moden (8/16/2016)


    ScottPletcher (8/16/2016)


    Jeff Moden (8/16/2016)


    ScottPletcher (8/16/2016)


    Even so, it's likely that for in-house audits, or less formal audits, the current table could be freely accessed, and then...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: what are some common naming conventions for sprocs?

    Probably most common is verb_object, such as Get_UserName, or some such. I've never seen the "main" table name used as part of the proc name, and it seems like...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Jeff Moden (8/16/2016)


    ScottPletcher (8/16/2016)


    Jeff Moden (8/16/2016)


    ScottPletcher (8/16/2016)


    Even so, it's likely that for in-house audits, or less formal audits, the current table could be freely accessed, and then INSERTs might not...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Jeff Moden (8/16/2016)


    ScottPletcher (8/16/2016)


    Even so, it's likely that for in-house audits, or less formal audits, the current table could be freely accessed, and then INSERTs might not need logged. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Update statistics after Index Rebuild ?

    Grant Fritchey (8/16/2016)


    MyDoggieJessie (8/16/2016)


    I've always been a little fuzzy on this one - So, is just executing sp_updatestats a safe bet after indexing? Realizing that rebuilildng indexes will only...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Even so, it's likely that for in-house audits, or less formal audits, the current table could be freely accessed, and then INSERTs might not need logged. But verify that...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Ed Wagner (8/16/2016)


    ScottPletcher (8/16/2016)


    Ed Wagner (8/16/2016)


    ScottPletcher (8/16/2016)


    Jeff Moden (8/15/2016)


    ScottPletcher (8/15/2016)


    Jeff Moden (8/15/2016)


    ScottPletcher (8/15/2016)


    Jeff Moden (8/15/2016)


    Also, you should probably avoid auditing inserts. It's an unnecessary duplication of data because even...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Ed Wagner (8/16/2016)


    ScottPletcher (8/16/2016)


    Jeff Moden (8/15/2016)


    ScottPletcher (8/15/2016)


    Jeff Moden (8/15/2016)


    ScottPletcher (8/15/2016)


    Jeff Moden (8/15/2016)


    Also, you should probably avoid auditing inserts. It's an unnecessary duplication of data because even if there's never...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need query for After Trigger on update,delete

    Jeff Moden (8/15/2016)


    ScottPletcher (8/15/2016)


    Jeff Moden (8/15/2016)


    ScottPletcher (8/15/2016)


    Jeff Moden (8/15/2016)


    Also, you should probably avoid auditing inserts. It's an unnecessary duplication of data because even if there's never an update, the...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 4,201 through 4,215 (of 7,615 total)