#!/usr/bin/perl -w use strict; my $schema = shift(@ARGV); my $infile = "./".$schema."_tables.out"; my $outfile = "./gen_rep_support_".$schema."_tables.sql"; my $table; open (INFILE, "< $infile") or die "Couldn't open $infile: $!"; my @tables = ; close (INFILE); open (OUTFILE, "> $outfile") or die "Couldn't open $outfile: $!"; foreach $table (@tables) { print OUTFILE "BEGIN\n"; print OUTFILE " DBMS_REPCAT.CREATE_MASTER_REPOBJECT (\n"; print OUTFILE " gname => 'beastdb_mstr_grp',\n"; print OUTFILE " type => 'TABLE',\n"; print OUTFILE " oname => '$table',\n"; print OUTFILE " sname => '$schema',\n"; print OUTFILE " use_existing_object => TRUE,\n"; print OUTFILE " copy_rows => FALSE);\n"; print OUTFILE "END;\n"; print OUTFILE "/\n\n"; } close (OUTFILE);