Forum Replies Created

Viewing 8 posts - 1 through 9 (of 9 total)

  • RE: Dynamic SQL

    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...

  • RE: Stored Procedure Performance

    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...

  • RE: Stored Procedure Performance

    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...

  • RE: List of Databases taking forever to load

    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....

  • RE: Rolling Off Data ... Nibbling with ROWCOUNT

    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...

  • RE: Rolling Off Data ... Nibbling with ROWCOUNT

    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...

  • RE: Cascade Update & Delete

    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...

  • RE: Report of user permissions for every database

    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...

Viewing 8 posts - 1 through 9 (of 9 total)