Hi,
Can anyone share some thoughts about t_web tables and how often they maintain these (and what they do)?
I did see the Knowledgebase article "Removing data from the Web Session tables".
After attempting to do some cleaning, I admit defeat. (I'm not a mean SQL programmer)
One problem I was having was due to a REFERENCE constraint between tables
The DELETE statement conflicted with the REFERENCE constraint "FK_T_WEB_SESSION_VARIABLE_t_web_session". The conflict occurred in database "impresario", table "dbo.t_web_session_Variable", column 'SessionKey'.
Cheers
Damien
Hi Damien,
Good day.
I have checked those two tables. If you really want to clean up the table, you need to delete the item in t_web_session_Variable first, then delete items in t_web_session_Session. that is all.
you cannot delete a PK item when it is used as FK in another table.
Have fun.
Ben
Damien,
This utility was added in v9.0 to do just that:
UP_CLEAR_WEB_TABLES is designed to clear out old data from web cart tables. While it is not necessary to do this there is no real reason other than custom reporting to keep old data in web tables. The procedure takes one parameter, @days_old, which is a number of days worth of data to keep in the tables. It is done this way so that it can be scheduled to run periodically with a constant value. If no parameter is passed (or the parameter is 0), no work is done. This is to prevent someone wiping out all data by mistake. Note that this procedure may take some time and may block current web transactions if there are large volumes of data to delete. (added v9.0)
Link to doc:
http://www.tessituranetwork.com/~/media/Documentation/System%20Administration/Tessitura_Database_Utilities.ashx
______________________________________
Ryan Creps
Network Developer |Tessitura Network, Inc
From: Tessitura Web Forum [mailto:forums-tessitura-web@tessituranetwork.com] On Behalf Of Damien Calvert Sent: Tuesday, September 29, 2009 3:37 AM To: Ryan Creps Subject: [Tessitura Web Forum] T_Web tables and maintenance
You were sent this email automatically because you subscribed to the Tessitura Web forum. You may reply to this message to post to the Web forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database: 270.13.113/2397 - Release Date: 09/28/09 17:53:00
I am getting ready to schedule this utility. We have over 8 years of data, we are thinking of keeping only a years worth of data. Do you think it is a good idea to phase the purges or just go with the one purge.
Thanks!
Jon
Hi Jon,
We are facing this same problem . Our t_web_session_session and t_web_session_variable tables are huge and we are trying to run the UP_CLEAR_WEB_TABLES procedure without much luck.
Basically the procedure runs really slow (given the enormous size of the two tables) and in the end fills up our Impresario Transaction log file and/or consumes all available disk space on the server.
I guess you would have faced similar issues cleaning up these tables having 8 years old data...? Would much appreciate if you can share your experience and how you managed this process.
Many thanks,
Sujit.
Hi Sujit
We faced this issue earlier this year. My colleague basically sat on our test server and ran the stored procedure for the early years and then realised when we got to the later ones that he could only do 3 months at a time.
We then set up a local table to store the days old value in.
CREATE TABLE [dbo].[lt_clean_web_days]([last_value] [int] NOT NULL)
We manually removed the lder years, then set the last_value to be 1800, then wrote a job with the main step being
DECLARE @days INT
SELECT @days = last_valueFROM lt_clean_web_days
EXEC Up_clear_web_tables @days_old=@days
SELECT @days = CASE WHEN @days < 270 THEN 180 ELSE @days - 90 END
UPDATE lt_clean_web_daysSET last_value = @days
Hi Mark,
Thanks for your response.
I much appreciate you sharing your SQL script here. That's a clever way of doing it.
You're right, decrementing the @days_old parameter by around 90 days might do the trick for the later years. In our testing we are getting similar outcomes, wherein deletion in small chunks seems more efficient.
Also part of the problem for us is that our database size is huge, and running a report on the database tables shows that the T_WEB_SESSION_SESSION and T_WEB_SESSION_VARIABLE tables are occupying most of it.
Do you know if you had the same problem, and if yes, was the size of the DB automatically reduced after running the clean up procedure? Or did you have to manually run some shrink commands?
Thanks for your cooperation.
Best,