Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    23

    Unanswered: 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

  2. #2
    Join Date
    Feb 2002
    Location
    Germany
    Posts
    141
    Which kind of exceptions are you getting?
    Rodney Krick

  3. #3
    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

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    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.

  5. #5
    Join Date
    Jan 2004
    Posts
    23
    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"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •