Test Data Manager

Expand all | Collapse all

Unable to register the table form Oracle DB?

  • 1.  Unable to register the table form Oracle DB?

    Posted Sep 14, 2017 09:15 AM

    Hi Team,

     

    I am not able to register the table from Oracle Database both from Portal and Data Maker. Getting the below error.

     

    Error in Data Maker:

     

    Database Error Message: SQLSTATE = 23000
    Microsoft SQL Server Native Client 11.0
    Violation of PRIMARY KEY constraint 'gtrep_table_def_pk'. Cannot
    insert duplicate key in object 'dbo.gtrep_table_def'. The
    duplicate key value is (621).

     

    Error in Portal:

    could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

     

    Could you please let me know what might be the issue for this.

     

    Thank You,

    Rajasekhar



  • 2.  Re: Unable to register the table form Oracle DB?

    Broadcom Employee
    Posted Sep 14, 2017 10:16 AM

    Rajasekhar,

     

    Can you un-register all tables in the project and try re-registering the table? Also are you getting the same error while registering any table or is it only with a particular one?

     

    Thanks,

    Anil



  • 3.  Re: Unable to register the table form Oracle DB?

    Posted Sep 14, 2017 10:52 AM

    Thank You Anil for the prompt response.

     

    I am getting this error for all the tables.

    I think the issue is

    I have copied the original repository and created new one in the same Database and i am using new repository. When ever i am using this new repository i am facing this issue. When i am using the original repository, i am not facing any issue.

     

    Do we need to do any configuration/changes if we use the duplicate repository?

     

    Thank You.

    Rajasekhar



  • 4.  Re: Unable to register the table form Oracle DB?
    Best Answer

    Broadcom Employee
    Posted Sep 14, 2017 11:07 AM

    Rajasekhar,

     

    Looks like the copy didn't happen correctly. To make a copy, you need to take a backup of the repository database using SQL server and then restore this to a new one.

     

    Another option is to setup an a new repository database using the DB Install kit like you did the first time around and then use "Remote Actions from different repository" option in Datamaker to copy required projects/profiles etc to the new repository. 

     

    Thanks,

    Anil



  • 5.  Re: Unable to register the table form Oracle DB?

    Posted Sep 14, 2017 11:40 AM

    Thank You Anil. 

    I will try Restore and Backup option instead of direct copy and check it.

     

    Regards,

    Rajasekhar



  • 6.  Re: Unable to register the table form Oracle DB?

    Posted Sep 18, 2017 05:07 AM

    Thanks Anil for teh solution.

     

    I have tried with Backup and Restore database, It worked for me. Now i am able to register tables.

     

    Thank you.

    Rajasekhar



  • 7.  Re: Unable to register the table form Oracle DB?

    Broadcom Employee
    Posted Sep 18, 2017 09:20 AM

    Rajasekhar,

     

    Your welcome. Glad to be of help.

     

    Thanks,

    Anil



  • 8.  Re: Unable to register the table form Oracle DB?

    Broadcom Employee
    Posted Sep 14, 2017 11:09 AM

    Hi Rajasekhar,

     

    Stepping back....

    "I have copied the original repository and created new one in the same Database "

    How did you accomplish this?  If you used a copy of the original repository, then this is the outcome I would expect. 

     

    Did you follow this:

    Copy Remote Repository

    https://docops.ca.com/ca-test-data-manager/4-2/en/administrating/repository-administration/copy-remote-repository

     

    It sounds like all your backend tables are prepopulated and that is why you are getting the duplicates.

     

    Cheers!
    Les



  • 9.  Re: Unable to register the table form Oracle DB?

    Posted Sep 14, 2017 11:22 AM

    Hi Les,

     

    I have copied using "Copy Database" option and created new one.

    Using Copy Remote Repository, how can i create new one from the existing one or what is the exact process for creating the new repository with the existing one.

     

    Please advice on this.

     

    Thanks,

    Rajasekhar



  • 10.  Re: Unable to register the table form Oracle DB?

    Broadcom Employee
    Posted Sep 15, 2017 01:28 PM

    Then that is why there are errors.  All the background tables are populated with the data.  The process that Anil laid out is spot on.

     

    Cheers!
    Les