Viewing 15 posts - 541 through 555 (of 3,011 total)
One of the things I found out early on was was that decision makers often ignore data in favor of their pre-existing desires and prejudices.
I created a fairly detailed analysis...
July 12, 2012 at 7:55 am
You can return the result set directly from the UPDATE statement.
create table [dbo].[TEST1]
(
[ID][int]not null primary key clustered,
[VALUE][int]not null
);
GO
insert into dbo.TEST1 (ID, VALUE) SELECT 1, 10;
update dbo.TEST1
set
VALUE = VALUE+5
output
inserted.ID,
deleted.VALUE as Old_VALUE,
inserted.VALUE...
July 11, 2012 at 1:39 pm
In the MDF you will need as much empty space as the largest index, probably a clustered index, and a bit more. If the largest table is 20 GB,...
July 10, 2012 at 9:43 pm
If the first week on the month always starts on day 1 on the month, this should do it:
declare @MonthStart datetime
-- Find first day of current month
set @MonthStart = dateadd(mm,datediff(mm,0,getdate()),0)
select
Week,
WeekStart...
July 10, 2012 at 9:32 pm
This script gets all the infomation you wanted for all databases on a server, and runs various queries to analyze it different ways. It works with SQL Server 7.0,...
July 10, 2012 at 4:30 pm
Disabling an index is fine, provided it is not clustered index.
Disabling a clustered index prevents user access to the underlying table data.
July 10, 2012 at 8:40 am
The table is a heap (index id=0), which means it does not have a clustered index.
You cannot do a reindex rebuild of a heap table in SQL Server 2000.
To be...
July 10, 2012 at 8:06 am
Are any of the indexes on foreign key columns?
If they are, you can run into issues when you try to delete a row from a referenced table, because it will...
July 9, 2012 at 9:23 am
Brandie Tarvin (7/5/2012)
Michael Valentine Jones (7/5/2012)
Then...
July 5, 2012 at 11:33 pm
Jeff Moden (7/5/2012)
Michael Valentine Jones (7/4/2012)
July 5, 2012 at 11:21 pm
Create a calendar table with a row for each date, and include a column that indicates if a date is a working day or not.
Then you can just run a...
July 5, 2012 at 5:25 am
Here is another calendar table function.
Date Table Function F_TABLE_DATE
July 5, 2012 at 12:15 am
GilaMonster (7/4/2012)
And if you do need to take ad-hoc full backups, take them WITH COPY_ONLY, that way they don't mess with the differential backups
I was thinking more of a situation...
July 4, 2012 at 1:51 pm
Instead of using a function to test the ability to convert to a uniqueidentifier before actually converting it, wouldn't it be faster to do this inline with a case statement...
July 4, 2012 at 1:36 pm
Things to be aware of with differential backups:
A major re-indexing operation will change virtually all the pages in the database, so any differential backup made after that will be the...
July 4, 2012 at 12:55 pm
Viewing 15 posts - 541 through 555 (of 3,011 total)