Viewing 15 posts - 6,166 through 6,180 (of 7,613 total)
EXEC sp_MSforeachtable '
IF EXISTS ( SELECT TOP (1) * FROM sys.columns
WHERE object_id(''?'') IS NOT NULL AND
name = ''SSMA_TimeStamp'')
BEGIN
PRINT ''Altering table "?" to remove column...
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".
April 4, 2014 at 10:16 am
There is a clustered primary key on an ID column ... The partition key needs to be placed on a DATETIME column ... 23M rows
23M rows is not that many....
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".
April 4, 2014 at 10:09 am
ErikMN (3/27/2014)
RBarryYoung (3/27/2014)
1) Make a new schema in your source DB called [Export]
2) For each table to be exported, create a View in [Export]...
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".
April 3, 2014 at 4:14 pm
I prefer to avoid anything that is date or language setting dependent; DATEDIFF(DAY, 0, first_day_of_month) % 7 will yield a value that never changes no matter what the SQL setup...
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".
April 3, 2014 at 2:58 pm
You don't need to actually INSERT rows to use those values in a computation. Simply determine the number of "steps" between each row, and multiply the value in 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".
April 2, 2014 at 4:15 pm
To me, splitting it is the trivial part. Analyzing all the possible variations will be vastly more complex.
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".
April 2, 2014 at 4:10 pm
If possible, I'd just add code to that job to write its status to a table in the other db. That way you could avoid referencing msdb at all...
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".
April 2, 2014 at 3:36 pm
I doubt you'll be able to recover the full number. Floats are imprecise beyond their guaranteed number of digits. You'll likely have to re-export the data.
That said, 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".
April 2, 2014 at 3:25 pm
andrew gothard (4/2/2014)
ScottPletcher (3/30/2014)
andrew gothard (3/29/2014)
Simple arithmetic, if you have 8k pages, one row per page (and we know that it's going to be bigger than that), 12500 rows. ...
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".
April 2, 2014 at 3:07 pm
AZ Pete (4/2/2014)
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".
April 2, 2014 at 1:27 pm
To allow the best possible use of any existing indexes, approach 1 is vastly superior to 2. Neither is best, however. Instead, assuming "endDate" is a date/datetime/etc., use...
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".
April 2, 2014 at 10:05 am
I think this will depend most on your I/O subsystem's speed.
But if there's only 30G total worth of data, I think you'd best off just doing a full shrink:
DBCC SHRINKFILE...
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".
April 1, 2014 at 8:31 am
For DBA, be aware that having no experience will make this a very difficult transition. Most employers don't hire completely inexperienced DBAs.
For DBA, download SQL Express, 2008 or 2012.
If...
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".
March 31, 2014 at 5:49 pm
Ed Wagner (3/31/2014)
ScottPletcher (3/31/2014)
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".
March 31, 2014 at 2:57 pm
New Born DBA (3/31/2014)
ScottPletcher (3/31/2014)
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".
March 31, 2014 at 11:38 am
Viewing 15 posts - 6,166 through 6,180 (of 7,613 total)