Existing project with entities but want to change the data source to a different database

Posts   
 
    
Dan G
User
Posts: 2
Joined: 13-Sep-2022
# Posted on: 13-Sep-2022 04:01:43   

Hi everyone.

I have an existing llblGen pro project which has no errors. I have many highly customised entities which are referencing Relational Model data.

We are migrating the database from Oracle 11c to Oracle 19.

I need to connect the new database with the existing LLBLGen pro project to generate the files for the new project.

The driver we are using for both databases is the ODP.NET

Whenever I delete the old relational data model and add a new one, I get over 600 errors related to: Mapped target, there is no target field defined for this mapping.

We have confirmed that the database structures are identical.

I am doing something wrong. Could someone please guide me on the correct process to connect to a secondary database and validate the existing entities?

Thanks

Dan

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 13-Sep-2022 09:14:31   

You don't need to delete your relational model data to migrate to the new database. Say your old database schema is called 'DBORA11' and the new one is called 'DBORA19'. Load your project into the designer and go to the catalog explorer. There you see the schema with 'DBORA11' (as in this example that's the name of the old db). If you want to migrate that to DBORA19, right click it and select 'Rename'. Rename it to the new schema (in this example 'DBORA19').

If your schemas are the same but the catalog (in Oracle projects this is the same as the server name or TNSNAME) should be named differently, right click that name too and rename it to the new situation.

You now open the Sync tab and click the 'Perform tasks' button. This will guide you through the refresh of the relational model data and as the names match your new situation it'll simply pull the tables from the new schema as if it was created on that new schema and you shouldn't get any errors.

Frans Bouma | Lead developer LLBLGen Pro
Dan G
User
Posts: 2
Joined: 13-Sep-2022
# Posted on: 13-Sep-2022 11:23:38   

Otis wrote:

You don't need to delete your relational model data to migrate to the new database. Say your old database schema is called 'DBORA11' and the new one is called 'DBORA19'. Load your project into the designer and go to the catalog explorer. There you see the schema with 'DBORA11' (as in this example that's the name of the old db). If you want to migrate that to DBORA19, right click it and select 'Rename'. Rename it to the new schema (in this example 'DBORA19').

If your schemas are the same but the catalog (in Oracle projects this is the same as the server name or TNSNAME) should be named differently, right click that name too and rename it to the new situation.

You now open the Sync tab and click the 'Perform tasks' button. This will guide you through the refresh of the relational model data and as the names match your new situation it'll simply pull the tables from the new schema as if it was created on that new schema and you shouldn't get any errors.

Thanks for that. It worked seamlessly.