diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 42a121767..26e1af38a 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -715,6 +715,10 @@ sub new $self->{connstring} =~ s/^/dbi:/; #return undef; } + if ($xcatcfg =~ /^DB2:/) { # for DB2 ,export the INSTANCE name + $ENV{'DB2INSTANCE'} = $self->{dbuser}; + } + my $oldumask= umask 0077; unless ($::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{realautocommit}}) { #= $self->{tabname}; $::XCAT_DBHS->{$self->{connstring},$self->{dbuser},$self->{dbpass},$self->{realautocommit}} =