Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to avoid SQL1035N during backup? 2

Status
Not open for further replies.

SantaMufasa

Technical User
Jul 17, 2003
12,588
US
Twice in a row now, while backing up databases, I have encountered (on different databases) this fatal error:
Code:
SQL1035N  The database is currently in use.  SQLSTATE=57019
Following is an excerpt of the code I run (after having properly set the system variables that appear in the code:
Code:
...
    db2 disconnect all > /dev/null
    db2 connect to $SCHEMA user $DB2USER using $DB2USERPW >> $SCHEMALOG 2>&1
    db2 backup database $SCHEMA to $EXPPIPE without prompting >> $SCHEMALOG 2>&1
********************************************************************************
This code has worked perfectly for months on my DB2 databases, but I obviously need to do something more to avoid the above error.

Do you have any suggestions?


[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
We had to deal with the same problem some time ago. In our case we found out that this was a bug of the current version but I'm not sure whether the next db2 fixpak or a corrected dmdb6bkp solved it for our environment ...

Anyway .. Installing the latest (!) fixpax can't hurt so you might want to check this out ...

Regards
Thomas
 
Truusvlugindewind, I would appreciate the benefit of your knowledge on whatever method will help us avoid this problem.

What syntax needs to change in my invocation(s), above, to achieve an error-free run?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
I take that as a "No". I'd suggest you read this:
Bottom line:
1st configure your log-method
2nd determine your backup schedule.

When 24x7 is required archival logging must be configured.
When you (still) use circular logging the problems mentioned by you cannot be avoided. The database needs to come down for the backup.

If the pdf is not clear I'd recommond:
 
Thanks, Truusvlugindewind and TSch, for your help. Hava
star.gif
.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top