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.
Especially if it includes, How I fixed it along with how to avoid it.
Absolutely! I'll try to remember to convene this discussion in August-- I think a lot of people could get something out of it.
Okay, I've packaged up my code and I'll send it to those of you who have expressed interest. If anyone else wants it, just DM me.
Some things to keep in mind with deleting lists: if the list has contents (customer #s) or relationship options you can't just delete the list from the backend; you would also need to delete those contents and/or relationship options before deleting the list. And keep in mind that other dependencies exist throughout the system that might make deleting those lists less than ideal, e.g. due to dependent appeals, or a headache/something you want to avoid, e.g. foreign key references from acknowledgements, etc.
One other thing to keep in mind: static lists might not have what we would consider an accurate last_used_dt if they're being used as a report parameter. Don't quote me on this one since I can no longer prove it because I took steps to remedy this in our instances, but just something else to keep in mind.
On the surface this seems like a pretty straightforward task but it's slightly complex. Depending on your needs, it might be easiest and cleanest in the long run to delete the old lists manually in the front end or check out my utility.
Happy list cleaning!
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
Q: why is this included: "and tstats = 'N'" ? There's an Analytics property in List Critera, but no Tstats property that I can find, so do I need to replace that line with Analytics instead?
Sorry, if it wasn't clear, that was about Heath's procedure, not John's
Interesting! Thanks for the insight Neil :) That's super useful and I'll try to add TRANSACTION to some of my code.
What used to be the T-Stats indicator - before Analytics replaced T-Stats - is now the Analytics indicator in List Manager in the application. The database column name did not change, only the on-screen text. Put another way, tstats = 'N' in Heath's SQL statement reflects the Analytics indicator unchecked in List Manager.
Excellent, thanks for the explanation, A!
Here is a visual from SSMS, but Madeline was the prompt.
I'm imagining a session at TLCC where we all sit quietly in a circle and when you feel safe get up in front of the group and start your unburdening statement with
"That time (in Live) ... "
Ah, I totally missed that Madeline had it in parentheses in her comment! Thanks all!
A few Ideas on this exist, but I've added a more comprehensive one (including links to the others):
community.tessituranetwork.com/.../better-management-for-old-lists-and-extractions-segmentations-and-output-sets