Datamaker: ORA-12704: character set mismatch. No changes made to database

Document ID : KB000004452
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

"ORA-12704: character set mismatch. No changes made to database." error message displayed when trying to use "write test data to repository" option within Datamaker.

Steps to reproduce:-

Pre-requisites:

1. Make sure the table(s) are registered at the version level of your Datapool.

2. The context is set to at the Data pool level into which the data needs to be moved into.

3. All the levels under the version level (Data set, Data Group and Data Pool) need to have the setting "Make Test Data available for external use" enabled. This can be found under the properties page of each level.

Steps: 

1. Log into GTDatamaker.

2. Click the source/target SQL window button.

3. Write your query to retrieve data from your registered table and execute it to display the result.

SQL Example Query:

select * from dbo.EMPLOYEE;

4. Select "Change context" from the top right hand side and click on the play button. 

5. Select the Data Pool into which the data needs to be written. The context is now set to the right position.

6. Now select "Write to Test Data Repository" from the top right hand side and click on the play button.

7. Click on the yes button of the next page to confirm the action.

We now see the "ORA-12704: character set mismatch.

No changes made to database

INSERT INTO MV_908252_10761_8372 ( "EMPLOYEE_ID", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "BIRTH_DATE", "EMP_SSN", "EMP_PASSWORD", "HIRE_DATE", "SALARY", "EXPENSES", "SAVINGS", "EMP_RECORD_ID") VALUES ( 567327, N'Carol seth', N'LName_1003', N'1003@ntlworld.com', N'700-500-1003', N'1971-05-01 00:00:00', N'700-01-1003', N'test_password', N'1990-06-30 00:00:00', 9051, 1810.2, 7240.8, 2003)

Do you wish to ignore this row and continue? "

 

 

Environment:
TDM 3.6 and 3.8 on Oracle Repository.
Cause:

The insert statements for numeric columns does not have N in front of the data and also it is not inside single quote.

For example, in the insert statement below the attribute EMPLOYEE_ID's value 567327 does not have an N in front of it and is not enclosed in single quotes.

INSERT INTO MV_908252_10761_8372 ( "EMPLOYEE_ID", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "BIRTH_DATE", "EMP_SSN", "EMP_PASSWORD", "HIRE_DATE", "SALARY", "EXPENSES", "SAVINGS", "EMP_RECORD_ID") VALUES ( 567327, N'Carol seth', N'LName_1003', N'1003@ntlworld.com', N'700-500-1003', N'1971-05-01 00:00:00', N'700-01-1003', N'test_password', N'1990-06-30 00:00:00', 9051, 1810.2, 7240.8, 2003)

 

 

Resolution:

Workaround:

INSERT INTO MV_908252_10761_8372 ( "EMPLOYEE_ID", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "BIRTH_DATE", "EMP_SSN", "EMP_PASSWORD", "HIRE_DATE", "SALARY", "EXPENSES", "SAVINGS", "EMP_RECORD_ID") VALUES ( 567327, N'Carol seth', N'LName_1003', N'1003@ntlworld.com', N'700-500-1003', N'1971-05-01 00:00:00', N'700-01-1003', N'test_password', N'1990-06-30 00:00:00', 9051, 1810.2, 7240.8, 2003)

The above SQL query should look more like

INSERT INTO MV_908252_10761_8372 ( "EMPLOYEE_ID", "FIRST_NAME", "LAST_NAME", "EMAIL", "PHONE_NUMBER", "BIRTH_DATE", "EMP_SSN", "EMP_PASSWORD", "HIRE_DATE", "SALARY", "EXPENSES", "SAVINGS", "EMP_RECORD_ID") VALUES ( N'567327', N'Carol seth', N'LName_1003', N'1003@ntlworld.com', N'700-500-1003', N'1971-05-01 00:00:00', N'700-01-1003', N'test_password', N'1990-06-30 00:00:00', N'9051', N'1810.2', N'7240.8', N'2003')

 

 

 

 

 

Additional Information:

A fix for this issue will be made available in TDM 4.0 which is scheduled to come out in early 2017.

If you would like to receive a patch for this issue or you experience further issues after upgrading to TDM 4.0, please open a support case by going to https://support.ca.com/irj/portal/anonymous/newhome or by calling customer care at http://www3.ca.com/us/support/customer-assistance.aspx.