Forum Replies Created

Viewing 15 posts - 1,801 through 1,815 (of 7,619 total)

  • Reply To: Excessive Blocking despite Read Committed Snapshot Isolation

    Also, be aware RCSI has a 14 byte per row added overhead.  If there isn't space available in the existing data pages, you can likely expect a lot of page splits...

    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 - Projected Monthly Revenue

    Sergiy wrote:

    gjoelson 29755 wrote:

    ... The problem is, we don't ship on the weekends  ie. Sat and SunThe problem is, we don't ship on the weekends  ie. Sat and Sun ...  

    Do...

    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 - Projected Monthly Revenue

    gjoelson 29755 wrote:

    Thank you for your guidance and reformatting this...it is helpful.

    However the main calculation that I'm looking for is to  figure out how to add the days and exclude 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 - Projected Monthly Revenue

    I've added some date calc ctes before the query to isolate the date calcs from the main query (also makes it much easier to test them standalone for assorted dates). ...

    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: Help filtering my WHERE clause

    No problem.  I don't have a real problem with CROSS APPLY, other than the performance hit.  I personally am not a big fan of UNPIVOT, I find the syntax kludgy...

    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: Help filtering my WHERE clause

    You really don't need UNPIVOT or CROSS APPLY for this.  They do add some overhead.

    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: Help filtering my WHERE clause

     

    SELECT
    Doc,
    SUM(CASE WHEN CHARINDEX('d', Op1+Op2+Op3+Op4) > 0
    THEN 1 ELSE 0 END)...

    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: Stopping the SQL Server Agent before a datacenter shutdown

    stevec883 wrote:

    Thanks Michael -- the checkpoint command will come in handy for sure.

    I pointed out CHECKPOINT.

    I have servers with hundreds of dbs.  If you just slam them down, the recovery...

    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: Logon Trigger security context

    You can add an EXEC AS.  Create a login that has only the specific authority it needs in the mgmt db to INSERT to the table; i.e., it doesn't 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: Upgrade to larger drive

    Agree completely, it should work, as long as the drive has the same letter and paths, just verify that the needed permissions are all back in place.

     

    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: Stopping the SQL Server Agent before a datacenter shutdown

    Jeffrey Williams wrote:

    stevec883 wrote:

    Scott - Thanks for the reply. So when you stop the Agent, what happens to the jobs that were supposed to run during the stoppage? That's mainly what...

    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: Stopping the SQL Server Agent before a datacenter shutdown

    If you stop the Agent, it will not go back into the past to run jobs when it is restarted.

    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: Data Warnings / Ignore Checked Results

    Phil Parkin wrote:

    Scott and as1981, thank you for taking the time to respond.

    Scott's approach works well enough, though I do not wish to universally add an IsValid flag to our tables,...

    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: Stopping the SQL Server Agent before a datacenter shutdown

    If SQL service itself is going to be stopped, then you should definitely stop the Agent service first.

    I'm not sure if the Agent would try to run missed jobs later...

    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: Calling a Function to Update Temp Table

    You're using a proc not a function.  You should use a function.  If you'll post the proc code, we can help you rewrite it as a func.

    For the proc, to...

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