|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Error in the script execution
Date: Jan 13 2003 6:16PM
On Mon, 2003-01-13 at 08:45, Sabherwal, Balvinder (MBS) wrote:
> Gurus,
>
> I have a script to perform the dump and load for given database. The section
> of the script is given below. There are 2 parts of this script. Part 1
> handles the dump of the database and part 2 handles the load of the
> database.
>
> I'm trying to debug the script as it's not loading the database. The command
> it send to the server is working in the isql session, not from the script.
> The dump command is working fine and the same way is used to do the load.
> Could anyone help me figure this out as why my load command would not from
> the script?? Secondly, When I check for the errors after executing the load
> command, I'm getting error as "Can't use string
> ("ARRAY(0x42987c)ARRAY(0x429888)") as an ARRAY ref while "strict refs" in
> use at DBDumpLoad.pl line 313.".
What is line 313 in the script?
Some comments:
> ## I don't know if this is ok. I get no errors on execution ##
> if ( @$dlog =~ /Msg/m || @$dlog =~ /Error/m )
Nope that won't work. Errors and such are sent back to the client in the
server callback. See the ct_callback() entry in the Sybase::CTlib man
page.
> ###############################################
> ## Connect to the Target Server
> ###############################################
> my $tdbh = Sybase::CTlib->ct_connect("$opt_u", "$tpwd" ,"$opt_s");
>
> if($tdbh eq undef)
use "if(!defined($tdbh))" instead.
Michael
> --
> Michael Peppler Data Migrations, Inc.
> mpeppler@peppler.org http://www.mbay.net/~mpeppler
> Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
> long term contract positions - http://www.mbay.net/~mpeppler/resume.html
|