Urgent: Migrating LLBL Gen Code to another Database Server

Posts   
 
    
yj
User
Posts: 39
Joined: 07-Aug-2007
# Posted on: 28-Aug-2007 04:04:16   

ASP.NET C# Oracle 10g LLBLGen Pro 2.0 SelfServicing

Hi guys, my team and I are facing one major concern here regarding the possiblity of migrating LLBLGen generated code from one DB server to another. I am currently using Oracle 10g at my server, and we are developing our solution using LLBL generated classes against the server DB directly. However, when I try to set up a local version of the DB having the same structure, I am unable to reuse the code that are being generated, even though i had change the datasource name and password accordingly in the App.config. Am i missin out any important steps here? This is very urgent and important to us also as the project will need to be shifted to another database server upon completion. Please help us on this. Thank you very much.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 28-Aug-2007 05:49:26   

Hi yj...

Do you want to change DB type (f.i.: SqlServer or MySql) or you want to change the DBServer location (still Oralce)?

If the last... Is the catalog name of the shifted server the same of the original catalog name server?

David Elizondo | LLBLGen Support Team
yj
User
Posts: 39
Joined: 07-Aug-2007
# Posted on: 28-Aug-2007 06:59:03   

daelmo wrote:

Hi yj...

Do you want to change DB type (f.i.: SqlServer or MySql) or you want to change the DBServer location (still Oralce)?

If the last... Is the catalog name of the shifted server the same of the original catalog name server?

hi daelmo,

We are not changing DB type (for God sake :> ), but we are using back the same Oracle 10g. The only thing is the DB shall be moved from a development server to a real time application server. The catalog (if i understand correctly) is the same, meaning that the schemas are the same. However, database (Oracle) will be different since it is in another machines. Thanks

ronindm
User
Posts: 3
Joined: 28-Aug-2007
# Posted on: 28-Aug-2007 07:07:35   

Hi yj,

I use the "CatalogNameUsage.ForceName" in the DataAdapter constructor, although i do not use the SelfService Adapter i am fairly sure there is way to override your database connection string. Overriding your Database connection string and catalog name should be all you need to do to get your code to work for a different DB.

I hope this helps simple_smile

Dave

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 28-Aug-2007 10:53:46   
  • The dataSource in the ConnectionString should refer to the tns name created at your machine to alias the database server.

  • If the schema/user has changed, you should change it in the connection string and also you should add a schema name overwrites section in the config file of your application. (ref: LLBLGen Pro manual "Using the generated code -> Application configuration through .config files -> Schema name overwriting"). As stated in the manual: "You can also specify an empty string. In that case, the schema name isn't generated into the SQL".

yj
User
Posts: 39
Joined: 07-Aug-2007
# Posted on: 30-Aug-2007 03:22:57   

Hi guys, thanks for the help.

I tried to move my database server to another local desktop yesterday and it was successful. What we did is that we create another Schema (Oracle) of the same name, with same table structures. We then create a Service name (a different one from the original) for the new database. Finally we regenerate the code using LLBL, using the new Service name to connect to the local desktop. After regen the code, we modify both the Web.config and App.config for the "Main.ConnectionString" values , changing the Data Source to point to the new service name (login and password remain d same), and voila.. it works!

Hope this will help. Enjoy

Thanks again.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Aug-2007 08:05:53   

Thanks for the feedback.. Good to know you made it simple_smile

David Elizondo | LLBLGen Support Team