
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2014 04:45 AM
Hi Everyone,
I'm hoping to get some help with this issue I'm having. I'm trying to scan the below key:
Key: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager
Value: PendingFileRenameOperations
Type: REG_MULTI_SZ
The issue I'm having is that no results are being found even when I know that the key & value exist.
My troubleshooting has isolated the problem down to the value being too long; the data type in the database is varchar(500) -- This indicates that Lansweeper is not truncating the value to 500 chars and thus the data is failing to be saved to the database.
I have confirmed this by modifying the value to be just over 500 chars and then just below 500 chars. When the value is over 500 chars, it doesn't display; when it's below 500 chars it displays.
Seeing what happens on the database side:
When reg value is over 500 chars: 0 rows returned
When reg value is under 500 chars: 1 row returned
Would it be possible to have Lansweeper truncate scanned values before attempting to insert them in the database?
I'm hoping to get some help with this issue I'm having. I'm trying to scan the below key:
Key: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager
Value: PendingFileRenameOperations
Type: REG_MULTI_SZ
The issue I'm having is that no results are being found even when I know that the key & value exist.
My troubleshooting has isolated the problem down to the value being too long; the data type in the database is varchar(500) -- This indicates that Lansweeper is not truncating the value to 500 chars and thus the data is failing to be saved to the database.
I have confirmed this by modifying the value to be just over 500 chars and then just below 500 chars. When the value is over 500 chars, it doesn't display; when it's below 500 chars it displays.
Seeing what happens on the database side:
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [RegistryID]
,[AssetID]
,[Regkey]
,[Valuename]
,[Value]
,[Lastchanged]
FROM [lansweeperdb].[dbo].[tblRegistry]
Where ValueName LIKE '%pending%' and AssetID = 164
When reg value is over 500 chars: 0 rows returned
When reg value is under 500 chars: 1 row returned
Would it be possible to have Lansweeper truncate scanned values before attempting to insert them in the database?
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2014 06:18 PM
Hi,
Indeed the problem is that values with more then 500 chars are not scanned.
If you run the following script in the section database scripts on the page configuration/database script then it will be possible to change the limit to 1000 characters.
ALTER TABLE tblregistry ALTER COLUMN value nvarchar(1000)
Indeed the problem is that values with more then 500 chars are not scanned.
If you run the following script in the section database scripts on the page configuration/database script then it will be possible to change the limit to 1000 characters.
ALTER TABLE tblregistry ALTER COLUMN value nvarchar(1000)
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2014 06:18 PM
Hi,
Indeed the problem is that values with more then 500 chars are not scanned.
If you run the following script in the section database scripts on the page configuration/database script then it will be possible to change the limit to 1000 characters.
ALTER TABLE tblregistry ALTER COLUMN value nvarchar(1000)
Indeed the problem is that values with more then 500 chars are not scanned.
If you run the following script in the section database scripts on the page configuration/database script then it will be possible to change the limit to 1000 characters.
ALTER TABLE tblregistry ALTER COLUMN value nvarchar(1000)
