on ‎2010 Mar 17 7:26 AM
SAP : ecc 6.0
os : linux 64
db : DB2
o
Issue : Online backup
Running : db2 backup db hcp online to /dev/rst0
/dev/rst0==> is a tape volume
Trying to take online backup from db2 from command prompt to the tape.
hclprdm:~ # su - db2hcp
hclprdm:db2hcp 51> db2 backup db hcp online to /dev/rst0
SQL2031W Warning! Please mount the target or source media on device
"/dev/rst0".
Do you want to continue(c), terminate this device only(d), abort the utility(t) ? (c/d/t) c
SQL2025N An I/O error "-902" occurred on media "/dev/rst0".
on disk the backup is happening and on tape not happening.
I could able to see the activity on the tape for some time.
Tar level backup from OS to the tape is happening and even able to restore the tar backup.
How to resolve the issue pl. let me know
Thanks in advance
Request clarification before answering.
Hi,
Before performing DB2 Online Backup to Tape, first you should have to initialize the tape with block size.
First you have to initialize the Backup Tape by executing the following command under <sid>adm or db2<sid> user.
db2 initialize tape on /dev/rst0 using 4096
Then you can execute the following command to perform online backup to Tape.
db2 BACKUP database <DBSID> ONLINE to /dev/rst0 WITH 2 BUFFERS BUFFER 4096 INCLUDE LOGS WITHOUT PROMPTING
You can see the backup progress by executing the following command.
db2 list utilities show detail
Regards,
Bhavik G. Shroff
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply
I tried this
hclprdm:db2hcp 56> db2 initialize tape on /dev/rst0 using 4096
SQL1297N This command is currently not supported on this platform.
hclprdm:db2hcp 57> uname -a
Linux hclprdm 2.6.16.60-0.42.9-smp #1 SMP Thu Jan 28 23:39:37 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
pl. inform me what i need to do for initializing it ?
hclprdm:db2hcp 62> db2
(c) Copyright IBM Corporation 1993,2002
Command Line Processor for DB2 ADCL 9.1.7
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a database manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
Hi,
SQL1297N This command is currently not supported on this platform.Sorry, as its only valid for windows. I forgot it.
You can simply execute that suggested backup command under db2<dbsid>, by connecting to your DB Instance.
e.g.
db2
db2> connect to <dbsid>
db2 > db2 BACKUP database <DBSID> ONLINE to /dev/rst0 WITH 2 BUFFERS BUFFER 4096 INCLUDE LOGS WITHOUT PROMPTING
You can use simple DB13 Job "Database Backup to Device" for the same.
Regards,
Bhavik G. Shroff
thanks Bhavik
I did the same as mentioned by you
hclprdm:db2hcp 63> db2 BACKUP database HCP ONLINE to /dev/rst0 WITH 2 BUFFERS BUFFER 4096 INCLUDE LOGS WITHOUT PROMPTING
SQL2035N The warning condition "2031" was encountered while executing the
utility in non-interrupt mode.
Howwever no activity seen on db as well as at os level
while running
hclprdm:db2hcp 54> db2 list utilities show detail
ID = 1346
Type = BACKUP
Database Name = HCP
Partition Number = 0
Description = online db
Start Time = 03/17/2010 15:28:35.712441
State = Executing
Invocation Type = User
Throttling:
Priority = Unthrottled
Progress Monitoring:
Estimated Percentage Complete = 0
Total Work = 97710826728 bytes
Completed Work = 0 bytes
Start Time = 03/17/2010 15:28:35.712560
end of error
hclprdm:db2hcp 55> db2 list utilities show detail
SQL1611W No data was returned by Database System Monitor. SQLSTATE=00000
pl. let me know any other options I have have to check
Thanks in advance
Thanks Bhavik
hclprdm:~ # su - db2hcp
hclprdm:db2hcp 51> initialize tape on /dev/rst0 using 4096
initialize: Command not found.
hclprdm:db2hcp 52> db2
(c) Copyright IBM Corporation 1993,2002
Command Line Processor for DB2 ADCL 9.1.7
You can issue database manager commands and SQL statements from the command
prompt. For example:
db2 => connect to sample
db2 => bind sample.bnd
For general help, type: ?.
For command help, type: ? command, where command can be
the first few keywords of a databawse manager command. For example:
? CATALOG DATABASE for help on the CATALOG DATABASE command
? CATALOG for help on all of the CATALOG commands.
To exit db2 interactive mode, type QUIT at the command prompt. Outside
interactive mode, all commands must be prefixed with 'db2'.
To list the current command option settings, type LIST COMMAND OPTIONS.
For more detailed help, refer to the Online Reference Manual.
db2 => initialize tape on /dev/rst0 using 4096
SQL1297N This command is currently not supported on this platform.
No change seen as it was not getting initialized.
Thanks again .
Any other modification need to be done ?
Hi Bhavik
thanks for inputs
I was able to start the backup however backup failed
the db2dailog shows
2010-03-17-19.23.23.618426+330 E76408611E579 LEVEL: Severe
PID : 7674 TID : 47600836241360PROC : db2agent (HCP) 0
INSTANCE: db2hcp NODE : 000 DB : HCP
APPHDL : 0-1487 APPID: *LOCAL.db2hcp.100317133414
AUTHID : DB2HCP
FUNCTION: DB2 UDB, database utilities, sqlubMWResponse, probe:1041
DATA #1 : Sqlcode, PD_TYPE_SQLCODE, 4 bytes
-2025
DATA #2 : Hexdump, 19 bytes
0x00000003B73A21A0 : 17F8 FFFF 2D39 3032 FF2F 6465 762F 7273 ....-902./dev/rs
0x00000003B73A21B0 : 7430 00 t0.
2010-03-17-19.23.23.618573+330 E76409191E844 LEVEL: Severe
PID : 7674 TID : 47600836241360PROC : db2agent (HCP) 0
INSTANCE: db2hcp NODE : 000 DB : HCP
APPHDL : 0-1487 APPID: *LOCAL.db2hcp.100317133414
AUTHID : DB2HCP
FUNCTION: DB2 UDB, database utilities, sqlubMWResponse, probe:1041
MESSAGE : SQL2025N An I/O error "" occurred on media "".
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -2025 sqlerrml: 14
sqlerrmc: -902 /dev/rst0
sqlerrp : sqlubMWR
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:
2010-03-17-19.23.23.660048+330 E76410036E373 LEVEL: Severe
PID : 7674 TID : 47600836241360PROC : db2agent (HCP) 0
INSTANCE: db2hcp NODE : 000 DB : HCP
APPHDL : 0-1487 APPID: *LOCAL.db2hcp.100317133414
AUTHID : DB2HCP
FUNCTION: DB2 UDB, database utilities, sqlubcka, probe:869
MESSAGE : Backup terminated.
hclprdm:db2hcp 63>
Can any one look and identify this ?
Hi Surya
db2dialog shows as follows
2010-03-17-19.23.23.660048+330 E76410036E373 LEVEL: Severe
PID : 7674 TID : 47600836241360PROC : db2agent (HCP) 0
INSTANCE: db2hcp NODE : 000 DB : HCP
APPHDL : 0-1487 APPID: *LOCAL.db2hcp.100317133414
AUTHID : DB2HCP
FUNCTION: DB2 UDB, database utilities, sqlubcka, probe:869
MESSAGE : Backup terminated.
details as below
2010-03-17-19.23.23.618573+330 E76409191E844 LEVEL: Severe
PID : 7674 TID : 47600836241360PROC : db2agent (HCP) 0
INSTANCE: db2hcp NODE : 000 DB : HCP
APPHDL : 0-1487 APPID: *LOCAL.db2hcp.100317133414
AUTHID : DB2HCP
FUNCTION: DB2 UDB, database utilities, sqlubMWResponse, probe:1041
MESSAGE : SQL2025N An I/O error "" occurred on media "".
DATA #1 : SQLCA, PD_DB2_TYPE_SQLCA, 136 bytes
sqlcaid : SQLCA sqlcabc: 136 sqlcode: -2025 sqlerrml: 14
sqlerrmc: -902 /dev/rst0
sqlerrp : sqlubMWR
sqlerrd : (1) 0x00000000 (2) 0x00000000 (3) 0x00000000
(4) 0x00000000 (5) 0x00000000 (6) 0x00000000
sqlwarn : (1) (2) (3) (4) (5) (6)
(7) (8) (9) (10) (11)
sqlstate:
2010-03-17-19.23.23.660048+330 E76410036E373 LEVEL: Severe
PID : 7674 TID : 47600836241360PROC : db2agent (HCP) 0
INSTANCE: db2hcp NODE : 000 DB : HCP
APPHDL : 0-1487 APPID: *LOCAL.db2hcp.100317133414
AUTHID : DB2HCP
FUNCTION: DB2 UDB, database utilities, sqlubcka, probe:869
MESSAGE : Backup terminated.
hclprdm:db2hcp 63>
How to diagnose this ?
Hi,
Have you defined the block size in the tape config ?
Thanks
Sunny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.