| version 1.13, 2005/05/10 10:06:14 |
version 1.14, 2005/05/10 10:11:17 |
|
|
| # Licensed under terms of GNU General Public License. |
# Licensed under terms of GNU General Public License. |
| # All rights reserved. |
# All rights reserved. |
| # |
# |
| # $Platon: scripts/perl/mysql/mysql-table-copy.pl,v 1.12 2005/05/10 10:00:16 rajo Exp $ |
# $Platon: scripts/perl/mysql/mysql-table-copy.pl,v 1.13 2005/05/10 10:06:14 rajo Exp $ |
| |
|
| # TODO: - reconnect on closed connection |
# TODO: - reconnect on closed connection |
| # - managment for tables with multiple KEY columns |
# - managment for tables with multiple KEY columns |
| Line 91 $dbh2->{AutoCommit} = 1; |
|
| Line 91 $dbh2->{AutoCommit} = 1; |
|
| # |
# |
| |
|
| if ($db_name1 =~ m/^DBI:Oracle:/) { |
if ($db_name1 =~ m/^DBI:Oracle:/) { |
| my $sth = $dbh1->prepare('ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD HH24:MI:SS\'') |
my $ignored = $dbh1->do('ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD HH24:MI:SS\'') |
| or die "DBI::prepare(): $DBI::errstr"; |
or die "DBI::do(): $DBI::errstr"; |
| $sth->execute() or die "DBI::execute(): " . $sth->errstr; |
|
| $sth->finish(); |
|
| } |
} |
| |
|
| if ($db_name2 =~ m/^DBI:Oracle:/) { |
if ($db_name2 =~ m/^DBI:Oracle:/) { |
| my $sth = $dbh2->prepare('ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD HH24:MI:SS\'') |
my $ignored = $dbh2->do('ALTER SESSION SET NLS_DATE_FORMAT = \'YYYY-MM-DD HH24:MI:SS\'') |
| or die "DBI::prepare(): $DBI::errstr"; |
or die "DBI::do(): $DBI::errstr"; |
| $sth->execute() or die "DBI::execute(): " . $sth->errstr; |
|
| $sth->finish(); |
|
| } |
} |
| |
|
| # }}} |
# }}} |