Viewing 8 posts - 1 through 9 (of 9 total)
I _think_ what you're trying to do execute the count function for a table dynamically....maybe so that you can do it for a list of tables with a cursor or...
December 16, 2005 at 5:31 am
Be careful using WITH RECOMPILE since SQL will not cache a plan for the proc. Recompiling can be very expensive depending on how complicated the proc is. You could...
December 1, 2005 at 8:20 am
Another cause may be that the stored procedure is getting a bad plan stuck in the cache due to the parameters passed in.
SQL Server does what's called "parameter...
December 1, 2005 at 7:40 am
I'm assuming you're using 2000...We've seen similar problems on certain machines where I work.
The solution we discovered was that the "slow" machines had a different version of sqldmo.dll....
March 9, 2005 at 5:35 am
You don't _need_ a begin/end tran, but you need to decide if you _want_ one in this case.
It depends on your data for this type of action. If another process may...
December 3, 2004 at 10:49 am
Here's a simple query to clear out a table 1000 rows at a time. The partitioned view shouldn't be any different
DECLARE @count int
SELECT @count = 1
WHILE (@count > 0)
BEGIN
SET...
December 3, 2004 at 6:10 am
One other option is to set the cascading on the foreign key itself. You can optionally set ON DELETE or ON UPDATE after the references section when defining a foreign...
December 1, 2004 at 6:14 am
There is an undocumented stored procedure that does just that called sp_MSforeachdb which lets you execute the same command in every database on the server. Google it or look here...
October 14, 2004 at 4:47 am
Viewing 8 posts - 1 through 9 (of 9 total)