Forum Replies Created

Viewing 15 posts - 5,446 through 5,460 (of 7,613 total)

  • RE: Real World:SQL server configuration Quality check script for DBA's.

    A script that purports to "check" settings should NOT change them, period. Even more so without a warning/statement that they've been changed!

    If a specific setting needs to be changed...

    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: Where can I find the definistion of this table value function

    Or:

    EXEC sp_helptext 'derived.Case_Times'

    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: Database size growth after Rebuild/reorganize job.

    You don't reorg/rebuild every index every week do you? You do have some type of check so that you rebuild only tables that are severely fragmented?

    If you're already doing...

    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: Where can I find the definistion of this table value function

    It's not a function, as there are no parentheses, (), after its name.

    This code will tell you what it is, in the "type_desc" column:

    SELECT o.*

    FROM sys.objects o

    WHERE

    ...

    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: Please explain what this Trigger query does

    Jeff Moden (1/19/2015)


    ScottPletcher (1/19/2015)


    I still see no reason to risk @@ROWCOUNT if you just want to know if a row was modified or not -- that easy enough to check...

    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: Rebuilding Indexes - Clustered v Non-Clustered

    Jeff Moden (1/19/2015)


    ScottPletcher (1/19/2015)


    For best overall performance, review "missing index" and index usage stats from SQL Server, then determine first and by far the most important: do you have 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".

  • RE: Performance problem when joining to a view.

    You could also defer decoding/lookup until after the counts are computed. This might make the final query more "natural-looking":

    Select

    age.[10_Year_Age_Band],

    epi.count

    From (

    ...

    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: Rebuilding Indexes - Clustered v Non-Clustered

    If you are on Enterprise Edition, you can do online rebuilds of most indexes, depending on the data types appearing in the index.

    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: Rebuilding Indexes - Clustered v Non-Clustered

    For best overall performance, review "missing index" and index usage stats from SQL Server, then determine first and by far the most important: do you have the best clustered index...

    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: Please explain what this Trigger query does

    I still see no reason to risk @@ROWCOUNT if you just want to know if a row was modified or not -- that easy enough to check with EXISTS(), which...

    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: Please explain what this Trigger query does

    Jeff Moden (1/19/2015)


    ScottPletcher (1/19/2015)


    @@ROWCOUNT is no longer reliable in triggers and should not be used to determine if/how many rows were affected. You have an easy alternative anyway, since...

    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: Describe & v$views in SQL Server

    Do not use INFORMATION_SCHEMA.* views in SQL Server. They are very slow compared to sys.* views and seem to cause much more locking/deadlocking. Based on research, it seems...

    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: Please explain what this Trigger query does

    @@ROWCOUNT is no longer reliable in triggers and should not be used to determine if/how many rows were affected. You have an easy alternative anyway, since you just want...

    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 else can you search for instead of col1 = '' or col1 = ' ' or col1 is null?

    You could check for ascii 0 in a the column like so:

    WHERE

    col1 LIKE '%' + CHAR(0) + '%'

    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 else can you search for instead of col1 = '' or col1 = ' ' or col1 is null?

    TheSQLGuru (1/16/2015)


    Where ltrim(rtrim(col1)) = ''

    I see this code ALL THE TIME at clients. Can someone tell me why both would be needed?? 😎

    Why would either be "needed"? Just...

    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 - 5,446 through 5,460 (of 7,613 total)