Viewing 15 posts - 856 through 870 (of 7,619 total)
Apologies on the mistake about COMPRESS.
I know you think that 2016 is magic after the first insert. The documentation says that new pages will be minimally logged. I'll...
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".
June 6, 2022 at 2:02 pm
Apologies on the mistake about COMPRESS.
I know you think that 2016 is magic after the first insert. The documentation says that new pages will be minimally logged. I'll have...
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".
June 6, 2022 at 1:57 pm
Using a loop to break things up into sections will cause the every section except the first to be FULLY LOGGED, which takes as much as 3 times longer...
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".
June 5, 2022 at 7:13 pm
Ooh, I accidentally left off one critical pre-step:
(0) Pre-allocate enough log space to handle the INSERTs. How much total log space you'll need depends on whether minimal logging is available...
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".
June 5, 2022 at 6:49 pm
If none of your tables have indexes, you should start there, and fast!
First, review the missing index stats to see which column(s) should be used in the clustered index. 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".
June 4, 2022 at 7:11 am
You could also consider using a brand new filegroup, with at least two files, for the new/replacement table, which will reduce any interference with other filegroups. Then again, you're stuck...
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".
June 3, 2022 at 9:03 pm
Not that I know of.
You could increase the log size to match the size it was originally if you wanted to. That may take some time as log space must...
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".
June 3, 2022 at 6:00 pm
I'll assume that when you refer to "primary index" on the original table you mean "clustering index". That is critical for copying the data (whereas a (nonclustered) primary key 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".
June 3, 2022 at 5:56 pm
Why are using this setting: SORT_IN_TEMPDB = OFF?
That's generally a very bad idea overall, esp. for larger 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".
June 3, 2022 at 6:12 am
I would think you'd want the last Response rather than just picking one seemingly at random (as in your results) or the value that happened to be the MAX one...
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".
June 1, 2022 at 7:40 pm
You should get rid of the local variable as it's not needed and causes overhead. Also, make sure that ANSI_NULLS and QUOTED_IDENTIFIER are set properly when the function is created.
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".
May 31, 2022 at 1:47 pm
If you have 200 entries, at least use a form of binary search rather than searching sequentially thru the list. Even better would be just looking it up in a...
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".
May 31, 2022 at 5:46 am
;WITH cte_distinct_customer_regions AS (
SELECT DISTINCT Customer_Key, Customer_Name, Component, Region
FROM Fill_Gaps
)
SELECT
cdc.Customer_Key, cdc.Customer_Name, cdc.Component, cdc.Region,
...
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".
May 27, 2022 at 7:23 pm
SQL Server has a system view, sys.dm_db_file_space_usage. In that view is column modified_extent_page_count, which tells how many db pages have been modified since the last full db backup. If you...
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".
May 27, 2022 at 3:49 pm
No, not directly from SQL Server anyway. SQL has no mechanism to allow only certain parts of data in a table to be backed up.
You back up databases (or filegroups,...
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".
May 26, 2022 at 5:26 pm
Viewing 15 posts - 856 through 870 (of 7,619 total)