Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Batch Script connecting two databases in an Extract Tranform Load (ETL) Design Pattern (Do you have any advice about how to structure a program that will be moving data between pgsql and sqlsrv databases?)
Re: Batch Script connecting two databases in an Extract Tranform Load (ETL) Design Pattern [message #4794 is a reply to message #4789] Mon, 22 June 2015 04:48 Go to previous messageGo to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
1) How do I clean out all of the menu and dict entries for this subsystem, if like me, one has messed things up pretty bad. I managed to crash apache from my radicore app. It took me like more hours than I care to admit, to start from scratch and rebuild everything. Many of those hours were spent banging my head against the config.inc file issue (again). And, like the previous time, I ended-up hardcoding my psgsql-schema into the dml class.

To completely erase a database from the dictionary database, select it and press the "Erase" navigation button.

To completely erase a subsystem from the menu database, select it and press the "Erase" navigation button.

2) It seems that you can only import a database into one subsystem

With the same name yes. If you have the same database name in two servers, and they have exactly the same structure, then you only need one definition in the dictionary.
If they have different structures, then you have to give one of them an alias name by using the "switch_dbnames" option as described in FAQ92.

If you have the same structure in two different servers, and you want to copy data from one server to another using the same class file, then you need to create two objects from the class file, but without using RDCsingleton::getInstance(), such as:
require 'classes/foobar.class.inc';
$object_from = new foobar;
$object_to = new foobar;

Note that both of these objects will have the following properties set to the same value:
$this->dbms_engine
$this->dbname
You can change these values manually in your code before you start using these objects:
$object_from->dbms_engine = 'mysql';
$object_from->dbname = 'alias';  // if there is an alias

You can then read from one object and write to another in order to copy you data from one database on one server to another database on an other server.

Easy Peasy Lemon Squeezy.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to use actions(submit,submitstay,copy,quit)
Next Topic: tutorial4 Viewing the Tree structure
Goto Forum:
  


Current Time: Sun Apr 28 19:24:10 EDT 2024

Total time taken to generate the page: 0.01226 seconds