Forum Replies Created

Viewing 15 posts - 1,546 through 1,560 (of 7,619 total)

  • Reply To: SQL Server High CPU Usage - (I think it's been taken care of, lol)

    What is the "cost threshold for parallelism" setting?  If it's lower than, say, 50, you should seriously consider changing it.

    Did you verify there are no physical issues -- controllers, NIC/communication...

    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 SERVER CLUSTERING INTERVIEW QUESTIONS

    Jeff Moden wrote:

    rehvin wrote:

    Hi guys, I have found this resource for interview preparation https://artoftesting.com/sql-queries-for-interview

    Lordy... not another one... 🙁  Jumping straight to the final two questions in the "experienced" section...

    Without loading 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: What to build the first time

    That's too much for a single q here.  You need to break this into separate qs, each with a single and specific 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: SQL Subqueries

    Your "first attempt" looks remarkably similar to the code I posted on an almost identical q of yours:

    https://www.sqlservercentral.com/forums/topic/printing-the-highest-count#post-3889964

    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: Printing the Highest count

    Nvm.

    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: Printing the Highest count

    You can use a subquery, but you don't technically need it.  If branches tie and you want to list all tied branches, change to "TOP (1) WITH TIES".

    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: Send alert whenever a Field data type value is about to reach its maximum limit

    Then, as I stated before, you would need to put an UPDATE trigger on that table.

    One trigger could handle all of the numeric, date, etc. columns in a table.

    The triggers...

    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: Speed up join

    (1) Does the original table have an IDENTITY column?  Or a added_date column?

    (2) Is the original table compressed (page or row compressed)?

    (3) Have you checked to see if compression would...

    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: Speed up join

    Best guess, without any other details, is to cluster the dbo.BCPDailybalmasterydaily table on ( processdate, acctno ).  If those columns are not unique and there's an identity column on 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".

  • Reply To: Set Cache Size of Sequence

    This depends on your use of the sequence.  If you use the sequence often, you will want a larger cache.  If less often, a smaller cache makes more sense.

    Also, be...

    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: Send alert whenever a Field data type value is about to reach its maximum limit

    If, for example, you're trying to determine that, say, an int value is nearing 2,147,483,647, then you could use an UPDATE trigger for that.

    If not along those lines, then, 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: Sql error log?

    It's likely safer to use sp_cycle_errorlog rather than running DBCC ERRORLOG directly.  The user must have sysadmin authority for using sp_cycle_errorlog.

    IIRC, typically that error means that the file is locked,...

    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: Email Alerts if backup job is failing

    ...to alert us if the backups failed. Is this possible?

    No.  But you can alert yourself if a successful backup did not occur.  [There is a subtle distinction.]

    For example, adjust 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: VARBINARY

    LEFT is for character data only.  You need to use SUBSTRING instead.

    ...
    SUBSTRING(bp.sort_path, 1, DATALENGTH(@CurrentSortPath))
    ...

    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: Dynamically creating Schema, new user and "Run As" new user

    Did you try 'EXECUTE AS USER ='?  Would that help you here?

    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,546 through 1,560 (of 7,619 total)