Forum Replies Created

Viewing 15 posts - 1,411 through 1,425 (of 7,619 total)

  • Reply To: Best Index Choices

    Hmm, interesting.  Lots of indexes there, so we'll need to do a full analysis, if you're willing.  Please run the attached query and post the results in some type of...

    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: Adding a surrogate key to a view

    Adi Cohn wrote:

    Adding a running number can add records if before the column addition there were duplications that were shown only once but after the column addition they stopped being duplications. ...

    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: Best Index Choices

    I can't offer index recommendations without seeing the DDL for the tables, including all current index definitions.  The most critical index is the clustered index, so that should be determined...

    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: Cursor replacement suggestions

    I typically use SSIS to do that, since it has the inherent capability to run multiple imports async.

    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: View running indefinitely after rebuilding indexes

    We need to see DDL for the tables, including index definitions, the query plan and the query itself.  There's no way for us to just imagine what is happening and...

    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: Hash join in query even after having clustered index

    Are you really only returning a single column from the query?

    If so, change to SELECT just from the table with that column, and use a WHERE EXISTS() on the other...

    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: Permissions needed to run query on master db

    Exactly.  And that's what I meant too.

    Jeff said that he'd "still" "say NO".  But, once you've made your objections known, and in writing for the record, and management still decides...

    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: sum and count in same column

    Maybe?:

    ,(sum(isnull(sc.numberofprocedures, 1))) 'ProcCount'

    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: Comparing every row in one table

    Your own login must not have SHOWPLAN permissions.  Check to see if someone will GRANT you that permission.

    As a DBA, I give that permission to everyone.  I don't see how...

    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: Comparing every row in one table

    Hmm, ran fine for me, but I'm on SQL 2016.  I think that code should work all way back to 2008, or at least 2012.

    We could join to the entire...

    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: Comparing every row in one table

    ;WITH cte_test_data AS(
    SELECT * FROM ( VALUES
    (1,'Not Paid', CAST('7-1-21' AS date)),
    ...

    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: Availability Groups - Object Sync

    lanky_doodle wrote:

    Hi,

    I'm in the process of doing a comparison of all the options available:

    Scripts Integration Services 3rd Party Tools

    We will have hundreds of instances and thousands of databases so need...

    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: Permissions needed to run query on master db

    Jeff Moden wrote:

    Personally, my answer to my boss would still be "NO (with an explanation as to why) but I'll be happy to execute any query under direct supervision after I've...

    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: Permissions needed to run query on master db

    Sorry, I thought I had posted some possible solutions.  I coulda' sworn I posted that and my response to Jeff earlier but it's obviously not here now.  Wish I'd kept...

    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: Permissions needed to run query on master db

    The DBA would not be in direct control of any genuine audit process.  It's too much of a potential conflict of interest.  Think about it: the company is/may be 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".

Viewing 15 posts - 1,411 through 1,425 (of 7,619 total)