cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 backup problem

Former Member
0 Kudos

Dear experts,

i'm new to DB2, i can handel MS_sql.

recendlty my company is running SAP on DB2 (windows 2003 server)

i'm unbale to find the init<SID>.db2/db6 to check and adjust the parameters.

if there is any configuration file (to adjust/configure tape drive) please let me know .

main 2 problems are :-

i need to archive the log (now it is 80%) to disk and tape.

*it is very help full,if you can give the syntax that has to typed in command line.

  • how to increase the size of archive log ?

  • how important it is to preserve the archived log ?

*how to put the label for archived log to disc or tape drive ?

and about tape drive backup:-

*i'm unable to take backup.

here is the steps that i had tried, to take backup or initialize the tape in drive.

#####

H:\IBM\SQLLIB\BIN>db2 backup db to
.\tape0

SQL0104N An unexpected token "
.\tape0" was found following "TO". Expected

tokens may include: "USER". SQLSTATE=42601

H:\IBM\SQLLIB\BIN>

###########

H:\IBM\SQLLIB\BIN>db2 backup db to
.\tape0

SQL0104N An unexpected token "
.\tape0" was found following "TO". Expected

tokens may include: "USER". SQLSTATE=42601

H:\IBM\SQLLIB\BIN>db2 rewind tape
.\tape0

SQL0104N An unexpected token "
.\tape0" was found following "TAPE".

Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601

H:\IBM\SQLLIB\BIN>db2 REWIND TAPE
.\TAPE0

SQL0104N An unexpected token "
.\TAPE0" was found following "TAPE".

Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601

H:\IBM\SQLLIB\BIN>db2 initialize tape
.\TAPE0

SQL0104N An unexpected token "
.\TAPE0" was found following "TAPE".

Expected tokens may include: "END-OF-STATEMENT". SQLSTATE=42601

H:\IBM\SQLLIB\BIN>LOGARCHMETH1

'LOGARCHMETH1' is not recognized as an internal or external command,

operable program or batch file.

#################

H:\IBM\SQLLIB\BIN>db2tapemgr

Parameter error. Reason: "DBT2120N No operation is specified.".

Incorrect syntax. Correct the syntax and reissue the command.

db2tapemgr [DATABASE database-alias]

[ON DBPARTITIONNUM db-partition-number]

{{{{STORE | DOUBLE STORE}[Store-Option-Clause]|

RETRIEVE [Retrieve-Option-Clause]|

SHOW TAPE HEADER tape-device}

[USING blocksize][EJECT]}|

EJECT TAPE tape-device|

DELETE TAPE LABEL tape-label|

QUERY [For-Rollforward-Clause]} [TRACE]

Store-Option-Clause:

ON tape-device [TAPE LABEL tape-label]

[ALL LOGS|n LOGS][FORCE]

Retrieve-Option-Clause:

{[For-Rollforward-Clause]

FROM tape-device[TO directory]|

{ALL LOGS|LOGS n TO m}

FROM tape-device[TO directory]|

HISTORY FILE

FROM tape-device TO directory }

For-Rollforward-Clause:

FOR ROLLFORWARD

TO {END OF LOGS|isotime [USING LOCAL|GMT TIME]}

[USING HISTORY FILE history-file]

DBT2008N db2tapemgr failed with errors.

H:\IBM\SQLLIB\BIN>

####

H:\IBM\SQLLIB\BIN>db2tapemgr db prd store on
.\tape0

DBT2065I Using database partition "NODE0000".

DBT2071I Using the automatic generated tape-label "PRD20070712193141".

Scanning history.

DBT2016I No log files found for processing.

DBT2006I db2tapemgr completed successfully.

H:\IBM\SQLLIB\BIN>

i request all experts to help me out in this basic step/configuration.

it would be very help full to the freshers.

        • if your are not aware of this, please pass on to the person who can give the answer *******

hope this happen.

Thanking you all,

by

Raghav

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Raghav,

In db2 there will not be any init file to change, it will use db2tapemgr tool to take backup to tape.

That you should do using the command window in db2<sid> user:

Try the following opption,

Back up commands list:

Commands to take Backup

1. command to initialize tape:

> db2 initialize tape on
.\<TAPE.DEVICE>

2. command to take database backup

>to take online backup

> db2 backup db P01 online to


.\<TAPE.DEVICE>

> To take offline backup

> db2 backup db p01 to
.\<TAPE.DEVICE>

3. Command to take ARCHIVE LOG FILES backup

>db2tapemgr DB P01 DOUBLE STORE ON


.\<TAPE.DEVICE>

{ DOUBLE STORE command stores log files on to

the device and delets the log files,when

they are copied second time }

>db2tapemgr DB P01 STORE ON
.\<TAPE.DEVICE>

{ STORE command stores the log files on to the

device and delets the log files after

copying the log files into the tape device.}

Rewards points if help full

with regards,

Balaji.s