Viewing 15 posts - 136 through 150 (of 275 total)
If you've got a lot of old data, you could partition the db so that new data was separate from old data. That could reduce the new partition size...
Scott Pletcher, SQL Server MVP 2008-2010
July 14, 2010 at 2:04 pm
OFF-TOPIC:
2. The task given looks like just an one-off query, for which I don't thing you need to over engineer solution.
Wow, that's a STUNNINGLY HUGE!!!! change from your responses here:
http://www.sqlservercentral.com/Forums/Topic936326-338-1.aspx?Highlight=studid
And...
Scott Pletcher, SQL Server MVP 2008-2010
July 14, 2010 at 12:19 pm
Be prepared for some effort: format files are a BEAR to get working, esp. the first time you try to use them.
The good thing is, once you get the format...
Scott Pletcher, SQL Server MVP 2008-2010
July 12, 2010 at 2:17 pm
172 2010-02-02 00:00:00.000 2010-03-03 00:00:00.000
172 2010-02-09 00:00:00.000 2010-03-28 00:00:00.000
only one row will be returned i.e
172 2010-02-09 00:00:00.000 2010-03-28 00:00:00.000
How does the code "know" which row(s) is(are) the "exception" rows...
Scott Pletcher, SQL Server MVP 2008-2010
July 12, 2010 at 2:15 pm
Note that you can still defragment the index "live", you just can't fully rebuild it.
Scott Pletcher, SQL Server MVP 2008-2010
July 12, 2010 at 7:57 am
I don't see any restrictions like that in MS docs on online index rebuilds. So that is an odd error.
Scott Pletcher, SQL Server MVP 2008-2010
July 9, 2010 at 3:57 pm
It sounds like it means that if a text column is in the table at all, you can't rebuild online. Will reseach more to confirm.
Which version of SQL?
Scott Pletcher, SQL Server MVP 2008-2010
July 9, 2010 at 2:45 pm
I would use a temp table for this.
You also need to get away from the dynamic SQL
INSERT INTO #table --or @table may work
EXEC sp_replmonitorhelpsubscription NULL,NULL,NULL,0,0,0,NULL,0
Scott Pletcher, SQL Server MVP 2008-2010
July 9, 2010 at 2:37 pm
It's safest to always add EXEC before stored proc names.
Because only the first statement in a batch has the EXEC "implied".
Scott Pletcher, SQL Server MVP 2008-2010
July 9, 2010 at 2:29 pm
CAST the result to decimal(nn, 2).
For example, something like this:
SELECT
'DataSize' =
CASE WHEN DataSize >= 1024
...
Scott Pletcher, SQL Server MVP 2008-2010
July 9, 2010 at 2:24 pm
select a.*, b.*
from TableA a
inner join (
select clientid, MAX(tbid) AS tbid
from tableB
group by clientid
) AS bMax...
Scott Pletcher, SQL Server MVP 2008-2010
July 8, 2010 at 11:52 am
I have tested DENY, even up to db_owner, and it works (interesting that it worked even for db_owner).
But my extensive testing was under SQL 2000. Naturally you'll want to...
Scott Pletcher, SQL Server MVP 2008-2010
July 7, 2010 at 9:45 am
There is a separate DENY command:
DENY DELETE ON <tablename> TO <user/role>
I think you can even specify multiple tablenames and/or users and roles in the same command.
[EDIT: You cannot specify multiple...
Scott Pletcher, SQL Server MVP 2008-2010
July 7, 2010 at 9:33 am
Yes, you need a trigger on every table.
You could try DENYing them DELETE (which is stronger than just not GRANTing them permission) as a good first step. But that's...
Scott Pletcher, SQL Server MVP 2008-2010
July 7, 2010 at 7:59 am
Are you talking about row deletion or table deletion (DROP)?
Scott Pletcher, SQL Server MVP 2008-2010
July 6, 2010 at 4:33 pm
Viewing 15 posts - 136 through 150 (of 275 total)