Syntax Error or Access Rule Violation detected by database (Unknown column 'discovery_map.sys_id' in 'field list')
by following step 7a (https://docs.servicenow.com/csh?topicname=t_MigrateSAMCustomSAMF.html&version=latest)
7. In Software Asset Management Foundation plugin configuration, set new field values (added as part of the automatic changes performed by plugin activation) to take advantage of the new features offered.
a. Navigate to Software Asset > Licensing > Software Models.
Database cache causing the issue.
Run scripts background
Instance performance might get impacted after run the script.