Bulk-inactivating lists

Is there any way to inactivate multiple lists at once? we have thousands of old lists that haven't been generated in a decade or more, and while I don't think it will cause too many disruptions if I mass delete them, I'm wondering if mass inactivating is an option, without having to go into each list's properties and inactivate them one at a time. 

Parents Reply
  • Also, since we went ahead and started this discussion on TRANSACTIONS, I thought I would share this.  Just because I like to fully document "standard procedures" for myself, I made this handy little file which I call "Transaction Standard Logic" as it has everything I might ever want in a TRANSACTION.

    USE impresario
    
    --Sets all errors as flaws
    SET	XACT_ABORT ON
    
    --Group for cleanliness of error handling
    BEGIN
    
    	--Open the TRY
    	BEGIN TRY
    	
    		--Use Transaction functionality to avoid issues with whatever you are doing during this process
    		BEGIN TRANSACTION trans_to_commit
    
    			--Stuff to do here
    			DECLARE	@test_variable INT
    			
    		--End and process everything
    		COMMIT TRANSACTION trans_to_commit
    
    	--Close the try
    	END TRY
    
    	--Open the catch
    	BEGIN CATCH
    
    		SELECT	ERROR_NUMBER() AS err_number,
    				ERROR_SEVERITY() AS err_severity,
    				ERROR_STATE() AS err_state,
    				ERROR_LINE() AS err_line,
    				ERROR_PROCEDURE() AS err_procedure,
    				ERROR_MESSAGE() AS err_message
    
    		--Test if the transaction is uncommittable
    		IF	(XACT_STATE()) = -1
    			BEGIN
    				PRINT N'The transaction is in an uncommittable state.' + 'Rolling back transaction.'
    				ROLLBACK TRANSACTION;
    			END
    
    		--Test if the transaction is still committable; theoretically impossible since XACT_ABORT is set to ON
    		IF	(XACT_STATE()) = 1
    			BEGIN
    				PRINT N'The transaction is committable.' + 'Committing transaction.'
    				COMMIT TRANSACTION
    			END
    
    	--Close the catch
    	END CATCH
    
    --Close the overall try/transaction grouping
    END
    

Children
No Data