I use DB2 for the past few years (2)

zhaozj2021-02-17  42

Outward

After the last thing I wrote, some people mentioned that I wrote Yuluo, then I am here to make the previous thing concise, it is the password of the DB2Admin user after I installed the DB2 database, causing DB2 services. It is not possible to start normally; therefore, it is recommended that you will be cautious when you modify the DB2Admin user password; but there is still a way to solve it. As for how to do it, please find me last time, I still say less ~~

Backup and recovery database

One day, others threw me an IBM book, saying to demonstrate a system; need to recover a Demo database. I said that I won't recover Database A, he said there is no relationship, and there is a step of recovering the database. I opened it. Sure enough, I first opened the DB2 Control Center (do you say that this is not nonsense), there is more abnormal words, if you don't know how to open the control center, find IBMDB2 items in the Start menu After finding the DB2 Control Center and click (ft! Put me as Agam! I will not be weak to this point! After reading this sentence, I was seriously depressed for a few minutes ~~). . . . . .

After a few minutes, he patted me and asked me if he was good; I said that I haven't yet, it is good. Then look down, it seems that there is an amount; how to recover the database according to the backup file, this master is described in the document: Select Create a database in the database, then create a new database in the pop-up page. Attribute database name Apis, what is to set up a database backup in the backup image page, which is specifically mentioned here that the option to select manually enter the backup image information, then the database name is the highest one of the backup files. The level directory name is SAMPLE with Sample.0's directory, and it is necessary to specify the timestamp of the backup file. The specific way is to see the last level directory name and the final file name, such as 20031204 / 180623.001, then its timestamp is 2003- 12-04 18:06:23. So this setting can be OK.

However, when doing database recovery, you must pay attention to the other pages: redirect table space and front roll; these once once a headache.

The first is the redirection of the table space. In the past database recovery, I usually restore according to the default table space container path of the backup database. There is a few times that death is unsuccessful, and the file system in the recovery job is Fully, the drive does not allow error messages such as operations (recovery jobs generate a working constant in the DB2 log, can look for error messages through the system prompts). Finding Cause One is that the drive specified by the container path does not have enough space for another reason that the container path points to the optical drive or other network drive. Especially when there are multiple databases on the machine, pay special attention to the redirect table space, otherwise the newly recovered database recovers the specified table space is not prompted to have an additional database that uses the same database table space. I have had a more painful lesson, which is spent for a week's demo data.

And if you do not cancel the option of recovering the pre-roll-up state, use the database after the recovery is successful "The database is in front roll" to connect to the database. Later, it was found that there was an approach to solve the restoration of the successful database, right-click on the database, select "Stop the forehead".

The above is all recovery of offline database backup files, and the recovery of online backups will be described later.

As for the backup database, it is relatively simple. Backup DB DBNAME to backpath is then waiting for a few minutes. I will not be there.

Demonstration ~~

2004-02-18 (just after reading the Chinese team competition)

转载请注明原文地址:https://www.9cbs.com/read-29036.html

New Post(0)