Viewing 15 posts - 871 through 885 (of 7,613 total)
The DECLARE for the cursor is incorrect: you need to remove the @ from before "@job_name":
DECLARE job_cursor CURSOR READ_ONLY FOR
SELECT job_name,[enable] --<<--
FROM #JobsToDisableEnable
Also, in the EXEC, 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 20, 2022 at 5:32 pm
Hello,
I was looking over the Edition specifications, and Standard is capped at 128 GB RAM is that correct?Can someone recommend me to use sql server enterprise edition or...
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 20, 2022 at 3:59 pm
If you're using 500GB now, it could be very hard to squeeze down to 128GB.
It's likely, however, that you are not using data compression now. From SQL 2016...
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 19, 2022 at 8:27 pm
Please don't use reserved words like "COUNT" and "TIME" for column names.
Please don't state that "COUNT" and "TIME" are reserved words in SQL Server because they are not.
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 19, 2022 at 8:19 pm
In fact, you cannot restore any newer-version SQL Server db to any older-version SQL instance, period. Just does not work.
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 18, 2022 at 8:19 pm
If you're using 500GB now, it could be very hard to squeeze down to 128GB.
It's likely, however, that you are not using data compression now. From SQL 2016 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".
May 18, 2022 at 8:17 pm
EXEC msdb.dbo.sp_update_job @job_name='<your_job_name>', @enabled = 0 /* to disable, or 1 to enable */
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 13, 2022 at 8:22 pm
You're not going to be able to this calculation:
ISRECNUM % 20 = 5
sargable. By definition, it just isn't.
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 13, 2022 at 1:54 pm
Actually, the development team should have nothing to do with how the data in the db is physically stored. That's the DBA's job. (Sorry, just...
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 13, 2022 at 1:41 am
Absolutely correct. McAfee could end up damaging your db files, esp. log files.
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 13, 2022 at 1:32 am
I suggest using a table to simplify the calcs:
;WITH test_data AS (
SELECT CAST('08/31/2021' AS date) AS [Period date], CAST('07/31/2022' AS date) AS [target...
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 13, 2022 at 1:29 am
Actually, the development team should have nothing to do with how the data in the db is physically stored. That's the DBA's job. (Sorry, just had 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".
May 12, 2022 at 4:45 pm
I suggest using SUM rather than COUNT. THEN 1 ELSE 0 is a consistent, clean pattern, whereas THEN 1 ELSE NULL is a kludge.
,SUM(CASE WHEN tc.IsEnabled =...
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 12, 2022 at 3:34 pm
Could you post directly usable data -- CREATE TABLE and INSERT statement(s) -- rather than just a picture? We can't write SQL against a picture :-).
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 12, 2022 at 3:30 pm
You don't need to use variables. I also suggest sticking to the "best practice" technique for getting a specific date value.
An index would be best on ( asis, twdatum );...
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 12, 2022 at 3:25 pm
Viewing 15 posts - 871 through 885 (of 7,613 total)