Subject | Re: [firebird-support] Automate transfer data from one database structure to another |
---|---|
Author | Ann W. Harrison |
Post date | 2005-05-14T23:11:37Z |
Namit Nathwani wrote:
where each command line copies a user table from the source database to
the target database.
This works on dialect 1 databases.
And yes, you can put the commands in a script and execute it the same
way that the commands execute the script 'foo.qli'.
Regards
Ann
>now with annotation
>>I'd use QLI and the following set of commands:
>>connect to the original database, giving it the alias 'source'.
>>qli> ready old_database.fdb as source
>>qli> ready new_database.fdb as targetconnect to the new database giving it the alias 'target'.
>>qli> for x in target.rdb$relations with x.rdb$system_flag = 0 orBuild a command script from the list of tables in the target database
>>con> x.rdb$system_flag is null
>>con> begin
>>con> print "target."||x.rdb$relation_name || " = source." ||
>>con> rdb$relation_name on "foo.qli"
where each command line copies a user table from the source database to
the target database.
>>qli> @...Invoke the generated script.
This works on dialect 1 databases.
And yes, you can put the commands in a script and execute it the same
way that the commands execute the script 'foo.qli'.
Regards
Ann