Subject | gfix shutdown and errorlevel |
---|---|
Author | Mark Ford |
Post date | 2010-10-04T19:03:17Z |
I've just installed the 2.5 release version on my windows 2000 server. I'm
running SuperClassic. In the new version it appears that calling:
gfix -user SYSDBA -password mypassword mydbalias -shut full -force 10
always will return the error "connection lost to database" (which is true of
course) however version 2.1.3 didn't give this error. It becomes a problem
in command/dos scripts where I want to check the errorlevel returned so that
I know if the shutdown was ok.
Is this working the way it should? Is there a change I can make in my gfix
call so that it works like the earlier versions? Perhaps I'm doing
something non-standard in my call. Here's an example of my backup script in
case it helps to understand the issue:
@echo off
gfix -user SYSDBA -password mypassword mydbalias -shut full -force 10
if errorlevel 1 GOTO NOT_SHUT
echo Shutdown Good
copy ... (backs up some files.)
echo Backup Good
gfix -user SYSDBA -password mypassword mydbalias -online normal
echo Startup Good
GOTO END_BATCH
:NOT_SHUT
echo Shutdown failed!
GOTO END_BATCH
:END_BATCH
Because of the "connection lost to database" error message my script will
always think the shutdown failed. Thanks for any suggestions!
-Mark
running SuperClassic. In the new version it appears that calling:
gfix -user SYSDBA -password mypassword mydbalias -shut full -force 10
always will return the error "connection lost to database" (which is true of
course) however version 2.1.3 didn't give this error. It becomes a problem
in command/dos scripts where I want to check the errorlevel returned so that
I know if the shutdown was ok.
Is this working the way it should? Is there a change I can make in my gfix
call so that it works like the earlier versions? Perhaps I'm doing
something non-standard in my call. Here's an example of my backup script in
case it helps to understand the issue:
@echo off
gfix -user SYSDBA -password mypassword mydbalias -shut full -force 10
if errorlevel 1 GOTO NOT_SHUT
echo Shutdown Good
copy ... (backs up some files.)
echo Backup Good
gfix -user SYSDBA -password mypassword mydbalias -online normal
echo Startup Good
GOTO END_BATCH
:NOT_SHUT
echo Shutdown failed!
GOTO END_BATCH
:END_BATCH
Because of the "connection lost to database" error message my script will
always think the shutdown failed. Thanks for any suggestions!
-Mark