Forum Replies Created

Viewing 15 posts - 1,861 through 1,875 (of 7,613 total)

  • Reply To: trigger email alerts in case file is delivered or failed for the job

    Phil Parkin wrote:

    What sort of help do you want?

    christi1711 wrote:

    Hi all,

    I have two SQL jobs. These jobs execute SSIS packages and then send files to e-mail.

    I need to create one more...

    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 maximum Server Memory

    Get the Developer Edition, that would allow you to use more RAM and give you many other added capabilities as well.

    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: increase the tempdb size bigger before job run

    > Is it a better approach before running the job I can make the initial size bigger? <<

    Yes, for sure.  For one thing, it means you can make sure 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: T-log Alert

    SQL Server Agent provides Alerts that can be configured to do that.  However, they are per server and, indeed, per db for log file counters.

    The default trace also contains entries...

    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: Lots of CTE and dynamic query

    Removing NOLOCK / UNCOMMITTED could only slow down the code, it could never speed it up.  Since OP is looking for a performance gain, removing NOLOCK is not the top...

    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: Lots of CTE and dynamic query

    As stated, we really need a query plan.  But this is always true: instead of "(select count(...) ...) > 0" you can just do an EXISTS check.  You don't really...

    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: Array into table.

    If you can count on the values being the same length and/or there are only a very limited number of length variations, you could just SUBSTRING the data from 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: Can anyone explain the design decision here?

    Jeff Moden wrote:

    Most people won't know the trick of of embedding a SELECT N=0 UNION ALL to make the "-1" calculation unnecessary. 

    I do know that trick, and have used it myself,...

    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: Please help to get duration between two 4 or 3 character string

    Here's an alternative method, just for the heck of it:

    SELECT 
    begin_time, end_time,
    LEFT(end_time, ISNULL(NULLIF(LEN(end_time) - 2, -1), 0)) * 60...

    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: %% Breakdown

    SUM(Revenue) OVER( PARTITION BY Region, Year, Month )

    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 Partition Drive Properly for SQL 2019

    Oops, seems not to be the case.  You just need to set max mem.  Maybe I'm remembering from an earlier version of SQL?!

    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 Partition Drive Properly for SQL 2019

    htt wrote:

    Jo,

    As I researched, SQL locks pages in memory so with SQL max memory set at 480 GB,

    I thought SQL only locked SQL pages in memory if the max 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: Can anyone explain the design decision here?

    If you do create a tally table, page compress it at 100 fillfactor.  That will save significantly on the overhead of reading the table.  And, since that table is static,...

    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: Using a SET statement inside of a CASE Statement

    In SQL Server, the CASE WHEN/THEN results are scalar (single) values only: keywords, operators, etc. are not allowed.  Thus, you need something more like below.

    Edit: That said, the expressions within...

    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: Can anyone explain the design decision here?

    SQL works based on tables.  By definition, a SQL Server table must have a name.

    To look at my own version of this:

    SELECT * FROM (VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) AS numbers(number)

    The VALUES clause is...

    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,861 through 1,875 (of 7,613 total)