DB2修改(mv)数据库文件名称后的现象

[db2inst1@db10g T0000004]$ db2 connect to test

   Database Connection Information

 Database server        = DB2/LINUXX8664 9.7.0
 SQL authorization ID   = DB2INST1
 Local database alias   = TEST

[db2inst1@db10g T0000004]$ db2 list tablespaces

           Tablespaces for Current Database

 Tablespace ID                        = 0
 Name                                 = SYSCATSPACE
 Type                                 = Database managed space
 Contents                             = All permanent data. Regular table space.
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 1
 Name                                 = TEMPSPACE1
 Type                                 = System managed space
 Contents                             = System Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 2
 Name                                 = USERSPACE1
 Type                                 = Database managed space
 Contents                             = All permanent data. Large table space.
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 3
 Name                                 = SDCSM_TABLE_SPACE
 Type                                 = Database managed space
 Contents                             = All permanent data. Large table space.
 State                                = 0x0000
   Detailed explanation:
     Normal


 Tablespace ID                        = 4
 Name                                 = SYSTOOLSTMPSPACE
 Type                                 = System managed space
 Contents                             = User Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 5
 Name                                 = MYSYSTEMP
 Type                                 = System managed space
 Contents                             = System Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 6
 Name                                 = SYSTOOLSPACE
 Type                                 = Database managed space
 Contents                             = All permanent data. Large table space.
 State                                = 0x0000
   Detailed explanation:
     Normal

[db2inst1@db10g TEST]$ ls
T0000000  T0000001  T0000002  T0000003  T0000004  T0000006
[db2inst1@db10g TEST]$ cd T0000003
[db2inst1@db10g T0000003]$ mv C0000000.LRG C00000000.LRG    <<--将表空间对应的文件mv(后面多加了一个0)
[db2inst1@db10g T0000003]$ db2 connect to test

   Database Connection Information

 Database server        = DB2/LINUXX8664 9.7.0
 SQL authorization ID   = DB2INST1
 Local database alias   = TEST


[db2inst1@db10g T0000003]$ db2stop
10/20/2015 15:02:48     0   0   SQL1064N  DB2STOP processing was successful.
SQL1064N  DB2STOP processing was successful.
[db2inst1@db10g T0000003]$ db2start
10/20/2015 15:02:52     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.
[db2inst1@db10g T0000003]$ ll
total 590404
-rw------- 1 db2inst1 db2iadm1 603979776 Oct 19 14:05 C00000000.LRG
[db2inst1@db10g T0000003]$ db2 connect to test      <<--将数据库文件改名重启db服务后还可以正常连接

   Database Connection Information

 Database server        = DB2/LINUXX8664 9.7.0
 SQL authorization ID   = DB2INST1
 Local database alias   = TEST

[db2inst1@db10g ~]$ db2 list tablespaces

           Tablespaces for Current Database

 Tablespace ID                        = 0
 Name                                 = SYSCATSPACE
 Type                                 = Database managed space
 Contents                             = All permanent data. Regular table space.
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 1
 Name                                 = TEMPSPACE1
 Type                                 = System managed space
 Contents                             = System Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 2
 Name                                 = USERSPACE1
 Type                                 = Database managed space
 Contents                             = All permanent data. Large table space.
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 3

 Name                                 = SDCSM_TABLE_SPACE
 Type                                 = Database managed space
 Contents                             = All permanent data. Large table space.
 State                                = 0x4000
   Detailed explanation:
     Offline


 Tablespace ID                        = 4
 Name                                 = SYSTOOLSTMPSPACE
 Type                                 = System managed space
 Contents                             = User Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 5
 Name                                 = MYSYSTEMP
 Type                                 = System managed space
 Contents                             = System Temporary data
 State                                = 0x0000
   Detailed explanation:
     Normal

 Tablespace ID                        = 6
 Name                                 = SYSTOOLSPACE
 Type                                 = Database managed space
 Contents                             = All permanent data. Large table space.
 State                                = 0x0000
   Detailed explanation:
     Normal


------mv数据文件后,竟然可以正常db2 connect to test,只不过表空间状态显示OFFLINE

你可能感兴趣的:(DB2修改(mv)数据库文件名称后的现象)