Forum Replies Created

Viewing 15 posts - 916 through 930 (of 7,619 total)

  • Reply To: Maintenance Plan to Sever All Connections

    AMCity wrote:

    but my understanding is that the -kill command does not kill connections that are in "Rollback" and unfortunately, we seem to have connections in ROLLBACK. 

    To the first point, there's...

    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".

  • Reply To: What queries to tune first?

    One place to start is reviewing the "Top 10 Avg I/O Queries".  See if anything stands out there.

    Next I'd review the index stats.  Looking particularly at missing indexes and 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".

  • Reply To: SQL Query - Finding CPU age (how old)

    Jeff Moden wrote:

    ScottPletcher wrote:

    Didn't you already ask this q?!

    According to the OPs profile, no.  In fact, this appears to be the first and only question they've posted.

    OK.  Sorry, my bad, it...

    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".

  • Reply To: SQL Query - Finding CPU age (how old)

    Didn't you already ask this q?!

    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".

  • Reply To: How to handle multiple Aliases

    Yes, there is a better way.  You can use CROSS APPLY(s) to assign alias name(s).

    SELECT [Date Req Created], [Date Initiated], ...
    FROM ...
    CROSS APPLY (
        SELECT NULLIF(A.CALC_Date_EOIReceived,...

    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".

  • Reply To: Learning SQL Server 2016

    (1) Download SQL Server Developer Edition.  (Hint: it's free!)

    (2) Get books by Itzik Ben-Gan (for T-SQL learning) or, for DBA/system learning, the "Inside SQL Server" books by MS.

    (3) Do 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".

  • Reply To: Create constraint using index

    Sergiy wrote:

    CREATE UNIQUE INDEX IX_ID2 ON  #IndexTEST(ID2) INCLUDE (ID);

    creates unique constraint, exactly as you requested.

    Second statement is not needed at all.

    Technically that's just a unique 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".

  • Reply To: SS2019 Running Extremely Slow

    The indexes will come along.  Since they are part of the db, they get restored with it.

    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".

  • Reply To: SS2019 Running Extremely Slow

    For more specific tuning, yes, we must see the query plan and the DDL for the table(s) involved, including all indexes.

    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".

  • Reply To: SS2019 Running Extremely Slow

    water490 wrote:

    ScottPletcher wrote:

    water490 wrote:

    Cost Threshold for Parallelism = 5

    Max Degree of Parallelism = 12

    Are these values correct?

    Definitely not for the first one.  Bump that up to at least 40:

    EXEC sys.sp_configure...

    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".

  • Reply To: Having a case or if statement in where clause on Max Date

    Note the "<" in the comparison; that is required.  This handles due_date correctly whether it is a datetime data type or a date.

    ;WITH cte_get_max_due_date AS (
    ...

    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".

  • Reply To: SS2019 Running Extremely Slow

    --Removed, double post.

    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".

  • Reply To: SS2019 Running Extremely Slow

    water490 wrote:

    Cost Threshold for Parallelism = 5

    Max Degree of Parallelism = 12

    Are these values correct?

    Definitely not for the first one.  Bump that up to at least 40:

    EXEC sys.sp_configure 'cost threshold...

    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".

  • Reply To: Healthcare / Medical sample database?

    I have extensive experience in health care as well.  Experience directly in that field is in fact very useful.

    Obviously industry terms may be different and have different connotations in each...

    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".

  • Reply To: Obtaining Restore Begin Date and End Date to calculate the duration

    Look at table msdb.dbo.restorehistory.

    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 - 916 through 930 (of 7,619 total)