|
From: Chris W. <ch...@cw...> - 2003-01-23 13:18:32
|
Nick Tkachenko wrote: > I have some databases (db1, db2 etc). > Some packages should work with one databasebase, some - at once with > several. How to configure OI, to use this opportunity? > > Ok! I'll describe my databases in conf/override_spops.ini & > conf/server.ini as: > [db_info db1] > ... > [db_info db2] > ... > > But how it is necessary to configure package, that this databases is > used? And how it is possible to use two different bases in package? > Whether I (and whether it will be correct) can use designs of a > kind "db1.table1" in struct/table1.sql for example? The package should not care what database you are using. Just set the configuration in conf/override_spops.ini, where 'myobject' is the object you have defined in your package: [myobject.datasource] action = add value = db1 or [myotherobject.datasource] action = add value = db2 And I think everything should work for creating the schemas, inserting data and fetching data. By default objects will use the datasource defined in: [datasource] default_connection_db = main So you only need to create entries in conf/override_spops.ini for the objects that are different. > Sorry for my bad english :-( Your english is much better than my russian! (It's been 10 years since school...) Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |