cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 backup problem

Former Member
0 Kudos
124

Dear Experts,

I'm unable to initialize the tape drive in DB2 on windows.

i tried executing commands in

start>programms>IBM DB2>command line tools>command line processor.

i'm getting error.But, in windows level Tape drive is working and NT backup is hapening. is there any provision to initiate Tape drive from "Control center" or any Script which i can execute in "command editor"

i request you to helpme out in giving guide lines to configure Tape drive for automated backup.

We are using DB2 on windows 2003 server.

thanking you all.

by

raghav

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

see bottom of following thread

If this does not work , please post the error messages you get .

best regards

dirk

Former Member
0 Kudos

Hello Drik,

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.

Thanking you all,

by

Raghav

Former Member
0 Kudos

Hi,

on the backup command you have forgotten to specify the database name:

db2 backup db <database name> to
.\TAPE0

on the rewind and initialize command you have forgotten the keyword "on":

db2 rewind tape on
.\TAPE0

If you have problems with the syntax, you can consult the DB2 documentation or use the question mark operator to retrieve additional information. For example:

db2 "? rewind tape"

Regards,

Jens

Answers (0)