
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2017 04:58 PM
I am technical back ground of MSSQL DBA. In one of our environment, lansweeper table TlbNlog is occupied of 320GB out of 380 GB total DB size. I am suspecting the purging is not happening. Lansweeper DB hosted on MSSQL Server enterprise edition.
I do not have knowledge on Lansweeper tables information and purging option.
Please suggest what information Tlblog store and which purging option to purge this table.
- Labels:
-
General Discussion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 09:13 AM
Hi
This is an old post but I've referenced it 2ce recently and had to work around an error both times
Problem - tblNtlogMessage table grows and maxes out SQL express 10GB limit
I've reduced the log retention in settings but table size didn't change
Below used to clear tblNtlog table to -7 days, then delete records from tblNtlogMessage where the EventID is not in tblNtlog or tblHyperVLog
(had to include tblHyperVLog to avoid error [The DELETE statement conflicted with the REFERENCE constraint "FK_tblHyperVLog_tblNtlogMessage"])
**This has not been approved by support - Use with caution**
I haven't seen any issues using it
Delete
FROM [lansweeperdb].[dbo].[tblNtlog]
WHERE [TimeGenerated] < GETDATE()-7
Delete
FROM [lansweeperdb].[dbo].[tblNtlogMessage]
WHERE [MessageID] NOT IN (SELECT DISTINCT [lansweeperdb].[dbo].[tblNtlog].[MessageID] FROM [lansweeperdb].[dbo].[tblNtlog])
AND
[MessageID] NOT IN (SELECT DISTINCT [lansweeperdb].[dbo].[tblHyperVLog].[EventMessageId] FROM [lansweeperdb].[dbo].[tblHyperVLog])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2017 12:59 AM
There might be better ways? We had to run this multiple times to avoid out of memory errors if we tried to run without a row restriction.
DELETE TOP (3000000) FROM [lansweeperdb].[dbo].[tblNtlog]
WHERE [TimeGenerated] < GETDATE()-180
DELETE FROM [lansweeperdb].[dbo].[tblNtlogMessage]
WHERE [MessageID] NOT IN (SELECT DISTINCT [lansweeperdb].[dbo].[tblNtlog].[MessageID] FROM [lansweeperdb].[dbo].[tblNtlog])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 05:33 AM
Edit: That is, to avoid purging those two tables completely.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2017 09:44 PM
3,4:"Truncate logs button"
Afterwards: Step 6 to optimize your database
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2017 09:12 AM
change "Delete eventlog entries after 21 days" to another (for example, 30).
Deleting of tblntlog doesn't affect the work of LS. It's just store of eventlog of Windows on the assets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2017 09:08 AM
tblNtlogFile;
tblNtlogMessage;
tblNtlogSource;
tblNtlogUser.
Documentation is located at http(s)://ls_server/DataDictionary/Default.aspx#1954106002
You can delete only tblNtlog with timegenerated older than 21 days. Other tables are dictionaries.
Hash-function of tblNtlogMessage.hash is unknown for me. IMHO it's only table with possible loosing consistence.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2017 03:32 AM
Scan Warning events.
Scan Information events.
Scan Success audit events.
Scan Failure events. Do you scan all events?
My Query: I am not technical expert or no access to LS. I guess all events are enabled.
My question the table tblNlog had nearly 15 months data i.e., approx 450 days. From my attached LS configuration screen, I see max purge configuration is 90 days.
Let me know your suggestions.
Q2.
I think
1. LS ignores deleting in your environment. You have to write to LS Support.
2. For future logs you can run query
Code: 1 delete from tblntlog where tblNtlog.TimeGenerated > Current_TimeStamp
also it is needed to clear log on assets side.
3. You can clear table by own query.
My Query: I agree with you to apply DELETE cmd on table. Is there any LS procedural document/blog step to purge without loosing consistence on database (back end).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 08:41 AM
1. LS ignores deleting in your environment. You have to write to LS Support.
2. For future logs you can run query
delete from tblntlog where tblNtlog.TimeGenerated > Current_TimeStamp
also it is needed to clear log on assets side.
3. You can clear table by own query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2017 08:25 AM
Scan Warning events.
Scan Information events.
Scan Success audit events.
Scan Failure events.
Do you scan all events?
