> I am trying to run some shell (DOS) commands on Win2k Perl 5.8.0 that
> allow me to
> call the Oracle Export Utility with some parameters. When I run my script
> these are the errors I receive
>
> C:\>perl a:\oraexp.pl
> Prototype mismatch: sub Socket::IPPROTO_TCP () vs none at
> C:/Perl/lib/Socket.pm
> line 395.
> Prototype mismatch: sub Socket::TCP_NODELAY () vs none at
> C:/Perl/lib/Socket.pm
> line 395.
> Scalar found where operator expected at a:\oraexp.pl line 56, near "'\\exp
> ' $CO
> NNECTUSER"
> (Missing operator before $CONNECTUSER?)
> String found where operator expected at a:\oraexp.pl line 56, near
> "$BACKUPDIR
> ' \samsdb.dmp log='"
> (Missing operator before ' \samsdb.dmp log='?)
> Scalar found where operator expected at a:\oraexp.pl line 57, near "'\\exp
> ' $CO
> NNECTUSER"
> (Missing operator before $CONNECTUSER?)
> String found where operator expected at a:\oraexp.pl line 57, near
> "$BACKUPDIR
> ' \samsdb.dmp log='"
> (Missing operator before ' \samsdb.dmp log='?)
> syntax error at a:\oraexp.pl line 56, near "'\\exp ' $CONNECTUSER "
> syntax error at a:\oraexp.pl line 57, near "'\\exp ' $CONNECTUSER "
> Execution of a:\oraexp.pl aborted due to compilation errors.
>
> I am a beginner and would appreciate any help.
>
> ******************Here is my code*****************************************
> use File::Path;
> use IPC::Run qw( run );
>
> my($ORAHOME,$ORASID,$CONNECTUSER);
> $BACKUPDIR = undef;
> $LOGDIR = undef;
> $LOGFILE = '\export_samsdb.log';
>
> # :::::::::::::::::::: End Declare Variables Section
>
> # :::::::::::::::::::: Begin Parameter Checking Section
>
> Start:
> print "\n What is the Oracle Home path ?";
> chomp($ORAHOME = <STDIN>);
> print "What is the Oracle SID ?";
> chomp($ORASID = <STDIN>);
> print "What is the username\/password ?";
> chomp($CONNECTUSER = <STDIN>);
>
>
> if ($ORASID) {
>
>
> # Create backup directories if already not exist
> unless (-d $BACKUPDIR) {
> print "Attempting to make BACKUP directory $BACKUPDIR ......
> \n";}
> eval { (mkpath ($BACKUPDIR='C:\SAMS_DB_BKUP\EXPORT'))};
> if ($@) {
> print "Could not create BACKUP directory: $@ \n"; }
> else { print "Directory made.\n";}
>
> unless (-d $LOGDIR) {
> print "Attempting to make LOG directory ........ \n";}
> eval { (mkpath ($LOGDIR='C:\SAMS_DB_BKUP\EXPORT\LOG'))};
> if ($@) {
> print "Could not create LOG directory: $@ \n"; }
> else { print "Directory made.\n";}
>
>
> # :::::::::::::::::::: Begin Export Section
>
> print $ORAHOME . '\\exp ' $CONNECTUSER . '@samsdb full=Y file=' .
> $BACKUPDIR ' \samsdb.dmp log=' . $LOGFILE;
> run $ORAHOME . '\\exp ' $CONNECTUSER . '@samsdb full=Y file=' . $BACKUPDIR
> ' \samsdb.dmp log=' . $LOGFILE;
> open (loghandle, ">>" .$LOGDIR . $LOGFILE) or die "Cannot create log
> file";
> print (loghandle "Export Completed Successfully");
>
> close(loghandle);
> }
> else {print '***********Did not define the Oracle SID';
> Goto Start;}
>
>
>
> # :::::::::::::::::::: End Export Section
>
>
>
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs