zhanzezhu
zhanzezhu

Reputation: 121

DB2: restore database returns error SQL2036N on Linux

I try to restore a DB2 database, but it says the return path is not valid.

This is what I tried:

db2 restore database gyczpas from "/home/db2inst1/GYCZPAS/PAS_BACKUP/GYCZPAS.0.db2inst1.NODE0000.CATN0000.20170109092932.001" taken at 20170109092932 into gyczpas
SQL2036N  The path for the file or device "/home/db2inst1/GYCZPAS/PAS_BACKUP/GYCZPAS.0.db2inst1.NODE0000.CATN000" is not valid.

I used the same path during RESTORE that I used for the BACKUP command, but it fails. What could be the reason?

DB22 version: v9.7

Upvotes: 0

Views: 3859

Answers (1)

data_henrik
data_henrik

Reputation: 17118

You are using the file name, not the path for RESTORE. Try something like the following - only specify the path:

db2 restore database gyczpas from "/home/db2inst1/GYCZPAS/PAS_BACKUP" taken at 20170109092932 into gyczpas

Upvotes: 6

Related Questions