Getting below errors while doing data model scan or re-scan: Tried on few projects with different connections and getting same error. Tried with existing project & on new project also.
(1) job: 499 profile: PF1: : failed to get metadata for conprof: PF1 with exception: InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement,
(2) Failed to scan entities for profile PF1, reason: TDMDatabaseException: job: 499 profile: PF1: : failed to get metadata for conprof: PF1 with exception: InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement: Exception raised: TDMDatabaseException: job: 499 profile: PF1: : failed to get metadata for conprof: PF1 with exception: InvalidDataAccessResourceUsageException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute statement
TDM Portal Version: 4.10.40.0
FDM Version: 4.10.30.0
Release : 4.10.40
Component : Web Portal - PII Audit/Scan
After running some diagnostic SQLs on TDM repository DB as below, it was found that the tcd_seq sequence is way over what we expected as maximum (9.999.999.999) and is preventing Portal to store any new entity with identifier which is generated by this sequence.
select s.name, s.current_value from sys.sequences s where s.name like 'seq_%'
select top 50 * from gtrep_table_col_def order by tcd_id desc
select top 50 * from gtrep_pii_table_col_def order by tcd_id desc
select top 50 * from gtrep_datadisc_ent_attr_def order by attribute_id desc
The patch binary is available at https://ftp.broadcom.com/user/downloads/priv/cbtmaint/zahab01/TDM/TDMPortal/TDMWeb-4.10.56.0.zip.
Please note that the very first start of the TDM Portal service after applying the patch will take (noticeable) longer time than usually as the repository will be updated. The next restarts will take usual amount of time.