'Mismatched Service Names' error while verifying Service Repository in Datamaker
search cancel

'Mismatched Service Names' error while verifying Service Repository in Datamaker

book

Article ID: 5439

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

When trying to connect to a profile in Datamaker, I am receiving the following error message: 


Service Layer: Error Testing Connection 
Error verifying Service Repository: 
Mismatched Service Names (This = <NewServer>, Service= <OldServer\Instance>


We recently copied over our gtrep repository to a new location in another server. We updated the rep.xml file with the new server information. We tried updating the repository (ctrl+alt+m), but there was nothing to update or sync. Datamaker seems to be referencing both database names still. 

Environment

Release : All Releases of TDM

Component : CA Test Data Manager

Cause

This is a common issue anytime the hostname of the Server hosting a Stand-alone instance of SQL Server is changed or updated. This is also known to happen whenever a SQL Server is being setup, or updated, via automated deployments as part of a Virtual Machine (VM), which can cause the Server Name to be 'null'.

What happens in TDM:

Datamaker issues the following SQL query:

select db_name (), rtrim (CONVERT(varchar(254), SERVERPROPERTY ('servername')));

While the GTService (Service Layer) issues:

select '', @@VERSION, @@SERVERNAME, '',     '',db_name();

And we expect the 'servername' to match. This is a way to validate we are connecting to the gtrep instance that we expect to be connecting to. When the names do not match, the GTService error is thrown indicating a mismatch in the Service Name:

Mismatched Service Names (This = <NewServer>\<Instance>, Service = <OldServer\Instance>)

Resolution

To correct the Server name used by the SQL Server, you need to contact your SQL Server DBA. They can run the following SQL queries to verify the values returned by the error.

select db_name (), rtrim (CONVERT(varchar(254), SERVERPROPERTY ('servername')));

select @@SERVERNAME;

As mentioned above, the two should match. In order to resolve the mismatch, the 'servername' need to be changed in SQL Server to the value of the 'NewServer'.

Your DBA can make the needed change by running the following SQL commands:

exec sp_dropserver 'OldServer';
GO

exec sp_addserver 'NewServer', 'local';
GO

Where, 'OldServer' is the old server name, and 'NewServer' is the new server name.

If you have Datamaker configured to use the Service Layer (the old GTService for TDoD) you need to also verify the Service Layer in Datamaker has been updated to use the new SQL Server host. Check your 'Primary Service URL' from the Security-> Users and Group-> Service Layer tab to reflect the correct machine name.

Additional Information

NOTE: If you are Using TDM 4.9.1 or greater you may do not need to have the Service Layer enabled, since TDoD GTService has been replaced by the native TDMService. If to have TDM 4.9.1 integrated with ARD,  you need to be running ARD 3.1.1 or greater, in order to stop using the depreciated GTService and start using the TDMService. However, even if you are using TDMService, the SQL Server is still required to return the 'servername' properly, thus the DBA will still need to correct this in the SQL Server database.