Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Smile Unanswered: Automatic Offline backup

    Hi,

    I have serveral databases on my Winodws 2000 machine. I am using DB2 EE v7.2 fixpack 8.

    I would like to automate offline backup of one database (e.g. "X") and all other databases must mork normaly.
    I would like to use some kind of command: force application all from database "x". Then execute an offline backup.
    Is there any way to do this?

    Thanks for help,
    Grofaty

  2. #2
    Join Date
    Sep 2002
    Posts
    456

    Re: Automatic Offline backup

    You can use the following command:

    db2 force applications all

    but this command will affect all other database connections as well. So the better way is to use

    db2 list applications all

    command and note down the application handle for specific database, in this case the one you want to backup and then issue

    db2 force applications (apphandle1, apphandle2.......apphandlen)

    This is bit tedious but wil work.

    dollar

    Originally posted by grofaty
    Hi,

    I have serveral databases on my Winodws 2000 machine. I am using DB2 EE v7.2 fixpack 8.

    I would like to automate offline backup of one database (e.g. "X") and all other databases must mork normaly.
    I would like to use some kind of command: force application all from database "x". Then execute an offline backup.
    Is there any way to do this?

    Thanks for help,
    Grofaty

  3. #3
    Join Date
    Jan 2003
    Posts
    1,605

    Re: Automatic Offline backup

    Hi,

    I am familar with your answer, but my quastion is: how to automate the proces?

    I don't want to manualy enter apphandle parameters. I am doing it now, but I would like to get rid of this with automatisation proces.

    Is there any way to automate offline backup proces?

    Thanks,
    Grofaty

    Originally posted by dollar489
    You can use the following command:

    db2 force applications all

    but this command will affect all other database connections as well. So the better way is to use

    db2 list applications all

    command and note down the application handle for specific database, in this case the one you want to backup and then issue

    db2 force applications (apphandle1, apphandle2.......apphandlen)

    This is bit tedious but wil work.

    dollar

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

    Re: Automatic Offline backup

    Well, DB2 does not provide a command to force off the applications of a single database.

    I had this problem and had written a shell-script on Unix using the command
    list applications for database <dbname>

    used awk to get the app-handles and forced off one application at a time ..

    I'm sure you can write a similar script for Windows ...

    Another issue when forcing off the applications is the asynchronous nature of the command, ie, your control returing to the command line after issuing the 'force' command doesn't indicate that the applications have been forced ... You will have to handle that as well, if you are planning to automate offline backups ....

    HTH

    Cheers

    Sathyaram


    Originally posted by grofaty
    Hi,

    I am familar with your answer, but my quastion is: how to automate the proces?

    I don't want to manualy enter apphandle parameters. I am doing it now, but I would like to get rid of this with automatisation proces.

    Is there any way to automate offline backup proces?

    Thanks,
    Grofaty

Posting Permissions

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