|
|
sybperl-l Archive
Up Prev Next
From: "Sabherwal, Balvinder (MBS)" <Balvinder dot Sabherwal at mortgagefamily dot com>
Subject: RE: SOLVED Error in the script execution
Date: Jan 13 2003 7:57PM
Never mind. Its manic Monday!! there was a typo
-----Original Message-----
From: Sabherwal, Balvinder (MBS)
[mailto:Balvinder.Sabherwal@mortgagefamily.com]
Sent: Monday, January 13, 2003 2:46 PM
To: SybPerl Discussion List
Subject: RE: Error in the script execution
> ###############################################
> ## 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.
Tried changing the script as suggested. Still its behaving the same way and
do not perform the load of the database.
Any other suggestions?? I'm wondering why its not performing load as the
next statement is to online the database and first thing is to kill all the
active users in the database. Both the commands get executed so that tells
me that I do have a valid database handle. Why its not executing the load
database command, I'm not able to find.
Thanks
-----Original Message-----
From: Michael Peppler [mailto:mpeppler@peppler.org]
Sent: Monday, January 13, 2003 1:16 PM
To: SybPerl Discussion List
Subject: Re: Error in the script execution
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
|