Selectively dumping a database table or its schema, for reload into a separate instance, or for recovery in the original instance.
Note: This is only possible with Virtuoso 6.0 and later.
There are many reasons, ranging from system corruption to migration, why you might want to reconstitute data across database management system instances.
SQL> CREATE PROCEDURE bkp_key ( IN f ANY , IN tb_name VARCHAR , IN key_name VARCHAR ) { backup_prepare ( f ) ; backup_index ( tb_name , key_name ); backup_flush (); backup_close (); };
backup_index
function.
T1
table's primary key to a file named "mylog.txn
", by executing:
SQL> bkp_key ( 'mylog.txn' , 'DB.DBA.T1' , 'T1' );
trx
file, by executing:
% virtuoso +crash-dump +foreground +mode l ## ( lower case L )
.db
file, and place the .trx
file produced by previous step.
Create a new DB with the schema from the source DB, by executing:
% virtuoso +restore-crash-dump +foreground ;
SQL> replay ('mylog.txn') ;