Viewing 15 posts - 2,026 through 2,040 (of 7,613 total)
It's long past time that SQL Server should provide a ROWLENGTH function that gives you the physical length of a row(s). But that's likely just wishful thinking on my part.
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".
December 29, 2020 at 8:28 pm
Use REBUILD ALL, it will (should) be more efficient.
But pre-grow the log first to the total size you will need for the REBUILD. It's a very slow process when 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".
December 29, 2020 at 8:13 pm
Of course the lazy way to get an accurate avg row size, if you have the time to let it run, is using:
EXEC sys.dm_db_index_physical_stats
specifying 'DETAILED'. SQL will then calc 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".
December 29, 2020 at 4:37 pm
I don't know your data. In the original q, you stated "each day of the week". So I guessed one week.
If you only need two days, then change the ending...
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".
December 29, 2020 at 4:28 pm
I've been a SQL Server DBA for 20 years, I've never heard of "magic tables" in SQL Server. You need to be clearer and more specific about what you're trying...
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".
December 29, 2020 at 4:23 pm
Not directly. But sysjobhistory has the time each step started and the duration of the step. Of course that means that the row for a step cannot be written 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".
December 29, 2020 at 4:00 pm
> 1024 * Reserved_Page_Count * 8 / Row_Count. My question here is, why the 1024? <<
So that the final calc is in bytes, not kb. That makes sense, since hopefully...
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".
December 29, 2020 at 3:51 pm
WHERE tdate >= '12-28-2020 17:00' and tdate < DATEADD(DAY, 7, '12-28-2020 05:00') and
(DATEPART(HOUR, tdate) BETWEEN 17 AND 23 or DATEPART(HOUR, tdate)...
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".
December 29, 2020 at 3:43 pm
It shouldn't take anything remotely close to 12 hours to rebuild indexes on tables that size with that much RAM available.
Unless maybe the table's incredibly wide. What is the average...
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".
December 29, 2020 at 1:32 am
First Possibility:
Restore the last backup of the db to a different db name, then copy the table employee table from the restored db over the employee table in the original...
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".
December 28, 2020 at 6:37 am
Two decimal places is the default when coverting from money to char. From MS docs, "CAST and CONVERT":
"
money
0 (default)
No commas every three digits to the left of the decimal point, 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".
December 23, 2020 at 7:32 pm
Was anything resolved on the earlier q where you asked about this?
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".
December 23, 2020 at 1:48 am
You're very welcome. Thanks for the feedback.
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".
December 21, 2020 at 6:48 pm
,SUM(CASE WHEN ServCode = 'MST' THEN 1 WHEN ServCode = 'S&M' THEN 1 WHEN RepairCodes.[Service] = 'Y' THEN 1 ELSE 0 END) AS [SERVICE]
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".
December 21, 2020 at 3:56 pm
In SQL Server, there is a way to assign a usable column alias, using CROSS APPLY:
SELECT TOP (1000) ST100
FROM CONSUL AS CD
LEFT JOIN table2 AS [Sx] ON...
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".
December 21, 2020 at 8:24 am
Viewing 15 posts - 2,026 through 2,040 (of 7,613 total)