IBM DB2 tb1 tb2 tb3 tb... strange files
My DB2 instance created a set of tb* files and every file is 1000M in size.
What are these files? Can I delete them with no problems for my db2 instance? (I'm not db2 expert, and the person who installed DB2 no longer works with me) If I did "开发者_如何学Pythonfile tb1" the result is "data"... :(
Here the directory:
[root@db01 db2inst1]# cd /home/db2inst1/ ; ls -lsha tb*
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb1
1001M -rw------- 1 db2inst1 db2iadm1 1000M Apr 27 14:06 tb10
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb11
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb12
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb13
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb14
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb15
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb16
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb17
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb18
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb2
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb3
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb4
1001M -rw------- 1 db2inst1 db2iadm1 1000M Apr 27 14:06 tb5
1001M -rw------- 1 db2inst1 db2iadm1 1000M Apr 27 14:06 tb6
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb7
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb8
1001M -rw------- 1 db2inst1 db2iadm1 1000M Nov 8 15:26 tb9
[root@db01 db2inst1]# file tb10
tb10: data
It is definitely possible that these files are tablespace containers for a DB2 database. If this is the case, removing them would be bad (if you care about the database).
The best way to do this would be to log in as the DB2 instance owner (db2inst1), connect to each database that exists in the instance (db2 connect to <db>
), and then use the db2pd
command t`db2pd -db command to get a listing of all tablespace containers.
A faster (but less safe) way to do this would be to simply execute the following command:
strings tb1 | head -1
If this returns DB2CONT
then it's likely that these files are/were files associated with a database.
I'm pretty sure this is the result of a split -b 1000M largefile t
on November 8th, or better yet split -b 1000M -d largefile tb
.
Edit The strange part is where parts 5,6,11 are from April 27th. That would probably be your own doing?
You can always run
file tb1
To find out what type of file it has been.
is there a tb0 somewhere?
or
cat tb* | strings | less
will be instrumental too. If you want to reconstruct the original file (assuming all parts are still there) simply
cat tb* > original_reconstructed
Another guess would be log files and not tablespace containers. These files would be created if you specified your database to have 18 primary and secondary log files with a size of 256 4K pages. Although the name and locations of the files are strange. And it also might explain the funny modified dates.
精彩评论