If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > offline backup in an ant script with websphere

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-04, 14:38
globetrotcom globetrotcom is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
offline backup in an ant script with websphere

I am using DB2 7.2 with Websphere 3.5.

I am trying to make an offline backup during the process of recycling a websphere application which uses DB2. I am doing all this in an ANT script. There is no problem with stopping and restarting the application when I don't mess with the database. But problems happen when I get into stopping and starting the database to make an offline backup.

Has anybody else been able to do this cleanly?

I am using the following process:

Stop the WS application.
"db2stop force" the database ("db2stop" by itself doesn't do the job)
"db2start"
"db2 backup database <dbname>"
Start the WS application

I get exceptions in the last part of re-starting the Websphere application.

I'll appreciate to hear about a clean way to do this without any manual intervention.

Thanks
Reply With Quote
  #2 (permalink)  
Old 04-07-04, 02:16
RKrick RKrick is offline
Registered User
 
Join Date: Feb 2002
Location: Germany
Posts: 141
Which kind of exceptions are you getting?
__________________
Rodney Krick
Reply With Quote
  #3 (permalink)  
Old 04-07-04, 03:18
Tank Tank is offline
Registered User
 
Join Date: Feb 2004
Location: Copenhagen
Posts: 220
Quiesce

You might want to try the
'quiesce database immediate force connections'
command instead of stopping the instance.

Then I think you will be able to do the backup
within the WS application

PS: which platform is your DB on?

BOW
__________________
Kristian K. Hansen
Project Supervisor
National Board of Health
Reply With Quote
  #4 (permalink)  
Old 04-07-04, 06:53
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: Quiesce

Quiesce database connection was not available in Version 7.2 ...

Globetrotcom,

Can you set a retry count for the connection request ... When you force the applications off, normally the first connection to the database returns an error ... If you try again, it will connect ... Therefore, if possible shut dwon the connections gracefully

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 04-07-04, 11:07
globetrotcom globetrotcom is offline
Registered User
 
Join Date: Jan 2004
Posts: 23
Quote:
Originally posted by RKrick
Which kind of exceptions are you getting?
Thanks for your reply.

The ANT script: stops the application-server; "db2stop force"; "db2start" and backs up database - all o.k. But problems happen when I try to restart the sever. The exception is included below.

I start and stop the application-server using this ant command, where "mode" can be "start" or "stop"

<target name="appServer">
<echo message="${mode}ing ${appServer} Application Server..."/>
<exec dir="${websphere}/../../../bin/" executable="wscp.bat" vmlauncher="false">
<arg line="-c &quot;ApplicationServer ${mode} /Node:${computer.name}/ApplicationServer:${appServer}/&quot;"/>
</exec>
<echo message="... Done!"/>
</target>



[echo] starting MyServer Application Server...
[exec] com.ibm.ejs.sm.client.RepositoryOpException: Failed t
o create InitialContext : Error during resolve
[exec] at com.ibm.ejs.sm.ejscp.ClientRepository.<init>(C
lientRepository.java:150)
[exec] at com.ibm.ejs.sm.ejscp.EjscpExtension.init(Ejscp
Extension.java:113)
[exec] at tcl.lang.JavaLoadCmd.cmdProc(JavaLoadCmd.java:
129)
[exec] at tcl.lang.Parser.evalObjv(Parser.java:810)
[exec] Failed to load extension : EjscpExtension
[exec] at tcl.lang.Parser.eval2(Parser.java(Compiled Cod
e))
[exec] at tcl.lang.Interp.eval(Interp.java:2042)
[exec] at tcl.lang.Interp.eval(Interp.java:2071)
[exec] at com.ibm.ejs.sm.ejscp.WscpShell.main(WscpShell.
java(Compiled Code))
[exec] invalid command name "ApplicationServer"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On