Deleting sitelog - urgent!
Last Post 01/16/2010 10:09 AM by Joseph Craig. 4 Replies.
Author Messages
saintX
Nuke Master
Nuke Master
Posts:147


--
01/16/2010 2:27 AM  
Hello, The size of the data on the disc is 415 MB, our disc space is 2GB. We got the messsage from provider that says: "Your site has over used the alloted space, and has been suspended by the server. If in next twenty four hours, you do not upgrade your current plan or reduce the files on the server, your account will be suspened, and we will be unable to re-open your account." After asking for declearation they told that the siteLog is too large.I used the tutorial 21, but as I execute: exec sp_SpaceUsed SiteLog - it shows that the size of table is 0KB and in the application itself there is exec sp_SpaceUsed And in Admin/SiteLog menu I see this message: Your Hosting Provider Has Disabled the Site Log History Feature For Your Portal. However, I deleted the SiteLogs and EventLogs (truncate table SiteLog and truncate table EventLog) and deleted all data in Portals/_default/Logs. But it seems that there is no affect there, because the CP still shows that the disc space is been exceeded. Is there any other solution for this issue? Thanks in advance - This is urgent!
saintX
Nuke Master
Nuke Master
Posts:147


--
01/16/2010 2:31 AM  
This is DNN 4.9.3 and currently it has 4 portals.
Joseph Craig
DNN MVP
Posts:11667


--
01/16/2010 9:15 AM  
You may need to do a backup to also delete some log files.

Here is a script (execute from the host's SQL page) that will tell you the sizes of your tables:

declare @RowCount int, @tablename varchar(100)
declare @Tables table (
PK int IDENTITY(1,1),
tablename varchar(100),
processed bit
)
INSERT into @Tables (tablename)
SELECT TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_TYPE = 'BASE TABLE' and TABLE_NAME not like 'dt%' order by TABLE_NAME asc

declare @Space table (
name varchar(100), rows nvarchar(100), reserved varchar(100), data varchar(100), index_size varchar(100), unused varchar(100)
)
select top 1 @tablename = tablename from @Tables where processed is null
SET @RowCount = 1
WHILE (@RowCount <> 0)
BEGIN
insert into @Space exec sp_spaceused @tablename
update @Tables set processed = 1 where tablename = @tablename
select top 1 @tablename = tablename from @Tables where processed is null
SET @RowCount = @@RowCount
END

update @Space set data = replace(data, ' KB', '')
update @Space set data = convert(int, data)/1000
update @Space set data = data + ' MB'
update @Space set reserved = replace(reserved, ' KB', '')
update @Space set reserved = convert(int, reserved)/1000
update @Space set reserved = reserved + ' MB'

select * from @Space order by convert(int, replace(data, ' MB', '')) desc

Joe Craig, Patapsco Research Group
Complete DNN Support
saintX
Nuke Master
Nuke Master
Posts:147


--
01/16/2010 10:06 AM  
Hello Joe and thanks for the answer.
The provider uses Plesk and I can not find the option to backup the database in their CP. However I could have a look at the DB in a funny online Enterprise Manager. The table SiteLog is empty. also the table EventLog. I wonder where these 1,5GB unnessesary data are stored in this DB?

B.T.W. I want to try your scripts on a local installation of DNN, what is this table mane here?
INSERT into @Tables (tablename)
Do I have to replace this with an actual table name or it will be defined here through this scripts?

Why actually truncate table SiteLog doesn't work here?

Thanks again Joe
Joseph Craig
DNN MVP
Posts:11667


--
01/16/2010 10:09 AM  
Just run the scripts as needed.

One of the places that lots of data is store is in the search index.

Joe Craig, Patapsco Research Group
Complete DNN Support


---