TDM Portal 4.8.x, 4.9.x
Component : CA Test Data Manager
An issue happened when upgrading from 4.8.X to 4.9.X and the schema was not update correctly.
NOTE: Prior to getting Engineering involved, the DBA made a modification to the user account which is accessing the gtrep database.
They added the db_owner permission, which didn't help the issue in of itself, as restarting the Portal service afterwards still failed.
As did the attempt to run a repair on the gterp database, and manually running the database migration.
Engineering joined the Webex, and reviewed the gtrep database's dbo.schema_version table, and the dbo.gtrep_entity_relationship table.
Both tables look correct.
Engineering deleted row 17 from the dbo.schema_version table, since this was the entry that is reported in the error - 126.96.36.199 entity_relationship desc (script V188.8.131.52_entity_relationship_desc.sql) from the gtrep db.
Example SQL command:
delete from schema_version where installed_rank =17
Then ran a repair from the command line:
1) Open a Command Prompt as Administrator
2) navigate the PORTAL_INSTALL\schema-management\bin directory. ( by default C:\Program Files\CA\CA Test Data Manager Portal\schema-management\bin)
3) run the repair operation:schema-management.bat -r
4) start the portal service
The repair was successful, but ended with the same 'SQLServer does not support setting the schema for the current session. Default schema NOT change to dbo'.
After restarting the CA Test Data Manager Portal service, Portal started without issues.
The assumption is deleting the entity relationship desc entry, and running the repair on the gtrep database, corrected the issue.
Engineering then modified the application.property file with the following entry to enable debug logging for Flyway:
The thought here is to get additional debugging to see what is the cause of the error.
NOTE: Make sure if you are upgrading and at the same time the existing gtrep has been moved to a new database, to verify the C:\Program Files\CA\CA Test Data Manager Portal\conf\application.properties reflects the new database name.