DB2数据库跨实例恢复

DB2 9.7 数据库迁移方案(重定向恢复) DB2数据库使用率越来越低了,从一开始的大面积使用到现在只剩一部分电信,政府,企业在坚持使用,网上能看到的资料也越来越少,而且能搜索到的资料都是很多版本之前的,已经失去了参考价值。而比较常用的数据库迁移,归档日志设置等,已经是错误的方法,下面主要介绍一下DB2数据库重定向恢复方法。主要用于将DB2数据库从一台主机迁移到另外一台主机,同时修改数据库的安装路径,表空间路径,表空间容器路径,默认缓冲池大... 阅读详情
DB2数据库也可以和Oracle一样,进行异机或跨实例进行备份集的恢复。原理与Oracle有几分类似,但DB2对表空间的处理有点特殊,分自动管理的表空间和非自动管理的表空间。经过测试,大致恢复过程如下。首先在线备份原数据库(包含原数据库的日志文件),再创建目标实例,再将备份集拷贝到指定目录,再依次按自动表空间,日志文件,非自动表空间的顺序进行恢复,最后对数据库进行前滚,并停止前滚完成数据库一致性,恢复结束。

原数据库

实例名:DB2
数据库名:JEPRODB
备份集文件:JEPRODB.0.DB2.NODE0000.CATN0000.20121225105802.001 (db2 backup database JEPRODB online to C:\DB2\NODE0000\JEPRODB\BACKUP include logs)

表空间状态:
c:\>db2pd -db JEPRODB -tablespaces

Database Partition 0 -- Database JEPRODB -- Active -- Up 0 days 00:49:29

Tablespace Configuration:
Address    Id    Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe  LastConsecPg Name
0xFCA487D0 0     DMS  Regular 8192   4        Yes  4        1     1         Off 1        0          3            SYSCATSPACE
0xFCA48FC0 1     SMS  SysTmp  8192   32       Yes  32       1     1         On  1        0          31           TEMPSPACE1
0xFCA4D7A0 2     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           USERSPACE1
0xFCA4DF90 3     DMS  Large   8192   4        Yes  4        1     1         Off 1        0          3            SYSTOOLSPACE
0xFCA4E780 4     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           DATA
0xFCA4EF70 5     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           INDX
0xFCA4F760 6     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           EXAMPLE
0xFA770060 7     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           DEANZA
0xFA770800 8     SMS  Regular 8192   32       Yes  32       1     1         Off 1        0          31           BIZTALK
0xFA772FC0 9     SMS  UsrTmp  8192   4        Yes  4        1     1         On  1        0          3            SYSTOOLSTMPSPACE

Tablespace Statistics:
Address    Id    TotalPgs   UsablePgs  UsedPgs    PndFreePgs FreePgs    HWM        State      MinRecTime NQuiescers
0xFCA487D0 0     8192       8188       7308       0          880        7308       0x00000000 0          0
0xFCA48FC0 1     1          1          1          0          0          0          0x00000000 0          0
0xFCA4D7A0 2     4096       4064       160        0          3904       160        0x00000000 1355985382 0
0xFCA4DF90 3     4096       4092       116        0          3976       116        0x00000000 0          0
0xFCA4E780 4     2048       2016       224        0          1792       224        0x00000000 1356067869 0
0xFCA4EF70 5     4096       4064       96         0          3968       96         0x00000000 0          0
0xFCA4F760 6     12800      12768      96         0          12672      96         0x00000000 0          0
0xFA770060 7     12800      12768      96         0          12672      96         0x00000000 0          0
0xFA770800 8     1          1          1          0          0          0          0x00000000 0          0
0xFA772FC0 9     1          1          1          0          0          0          0x00000000 1356069253 0

Tablespace Autoresize Statistics:
Address    Id    AS  AR  InitSize    IncSize     IIP MaxSize     LastResize                 LRF
0xFCA487D0 0     Yes Yes 33554432    -1          No  None        None                       No
0xFCA48FC0 1     Yes No  0           0           No  0           None                       No
0xFCA4D7A0 2     Yes Yes 33554432    -1          No  None        None                       No
0xFCA4DF90 3     Yes Yes 33554432    -1          No  None        None                       No
0xFCA4E780 4     No  No  0           0           No  0           None                       No
0xFCA4EF70 5     Yes Yes 33554432    -1          No  None        None                       No
0xFCA4F760 6     No  No  0           0           No  0           None                       No
0xFA770060 7     No  Yes 0           20971520    No  0           None                       No
0xFA770800 8     No  No  0           0           No  0           None                       No
0xFA772FC0 9     Yes No  0           0           No  0           None                       No

Containers:
Address    TspId ContainNum Type    TotalPgs   UseablePgs StripeSet  Container
0xFCA48E50 0     0          File    8192       8188       0          C:\DB2\NODE0000\JEPRODB\T0000000\C0000000.CAT
0xFCA495F0 1     0          Path    1          1          0          C:\DB2\NODE0000\JEPRODB\T0000001\C0000000.TMP
0xFCA4DE20 2     0          File    4096       4064       0          C:\DB2\NODE0000\JEPRODB\T0000002\C0000000.LRG
0xFCA4E610 3     0          File    4096       4092       0          C:\DB2\NODE0000\JEPRODB\T0000003\C0000000.LRG
0xFCA4EE00 4     0          File    2048       2016       0          c:\db2\node0000\jeprodb\data01
0xFCA4F5F0 5     0          File    4096       4064       0          C:\DB2\NODE0000\JEPRODB\T0000005\C0000000.LRG
0xFCA4FDE0 6     0          File    12800      12768      0          c:\db2\node0000\jeprodb\example.dbf
0xFA770690 7     0          File    12800      12768      0          c:\db2\node0000\jeprodb\DEANZA.DBF
0xFA770E30 8     0          Path    1          1          0          c:\db2\node0000\jeprodb\BIZTALK
0xFA7735F0 9     0          Path    1          1          0          C:\DB2\NODE0000\JEPRODB\T0000009\C0000000.UTM
目标数据库:同名数据库恢复DB2:JEPRODB => INST1:JEPRODB
实例名:INST1(需手动创建)
数据库名:JEPRODB(无需创建,恢复时会自动创建)
恢复步骤

1,创建实例INST1
c:\>db2icrt INST1
c:\>db2set DB2INSTPROF
DB2INSTPROF=C:\ProgramData\IBM\DB2\DB2COPY1 默认实例会创建在这个目录
2,将备份集拷贝至c:\
3,恢复表空间
c:\>set db2instance=INST1设置环境变量
c:\>db2 get instance
c: \>db2start 启动实例INST1
a,恢复自动存储表空间
c:\>db2 restore db JEPRODB from c:\ taken at 20121225105802 on c:\
SQL2563W  The restore process has completed successfully, but one or more
table spaces from the backup were not restored.
b,恢复日志文件,这里将日志文件恢复到了DB2默认的目录。
c:\>db2 restore db JEPRODB from c:\ taken at 20121225105802 on c:\ logtarget C:\INST1\NODE0000\SQL00001\SQLOGDIR
SQL2539W  Warning!  Restoring to an existing database that is the same as the
backup image database.  The database files will be deleted.
Do you want to continue ? (y/n) y
SQL2563W  The restore process has completed successfully, but one or more
table spaces from the backup were not restored.
c,恢复非自动存储表空间
c:\>db2 restore db JEPRODB from c:\ taken at 20121225105802 on c:\ redirect generate script INST1_JEPRODB.ddl生成INST1_JEPRODB.ddl脚本进行非自动表空间的恢复,并修改表空间的路径为新实例的路径,该文件在本文最后。
DB20000I  The RESTORE DATABASE command completed successfully.

c:\>db2 -tvf INST1_JEPRODB.ddl
UPDATE COMMAND OPTIONS USING S ON Z ON JEPRODB_NODE0000.out V ON
DB20000I  The UPDATE COMMAND OPTIONS command completed successfully.

SET CLIENT ATTACH_DBPARTITIONNUM  0
DB20000I  The SET CLIENT command completed successfully.

SET CLIENT CONNECT_DBPARTITIONNUM 0
DB20000I  The SET CLIENT command completed successfully.

RESTORE DATABASE JEPRODB FROM 'c:\' TAKEN AT 20121225105802 ON 'c:\' DBPATH ON 'c:\' INTO JEPRODB REDIRECT
SQL2539W  Warning!  Restoring to an existing database that is the same as the
backup image database.  The database files will be deleted.
Do you want to continue ? (y/n) y
SQL1277W  A redirected restore operation is being performed.  Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I  The RESTORE DATABASE command completed successfully.

SET TABLESPACE CONTAINERS FOR 4 USING ( FILE   'c:\INST1\node0000\jeprodb\data01'                                   2048 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 6 USING ( FILE   'c:\INST1\node0000\jeprodb\example.dbf'                             12800 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 7 USING ( FILE   'c:\INST1\node0000\jeprodb\DEANZA.DBF'                              12800 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

SET TABLESPACE CONTAINERS FOR 8 USING ( PATH   'c:\INST1\node0000\jeprodb\BIZTALK' )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

RESTORE DATABASE JEPRODB CONTINUE
DB20000I  The RESTORE DATABASE command completed successfully.
d,具备了表空间数据文件和日志文件,可以对数据库进行前滚恢复了,确保日志文件已经恢复或拷贝到了默认日志目录。
c:\>db2 rollforward db JEPRODB to end of logs

                                 Rollforward Status

 Input database alias                   = JEPRODB
 Number of nodes have returned status   = 1

 Node number                            = 0
 Rollforward status                     = DB  working
 Next log file to be read               = S0000015.LOG
 Log files processed                    = S0000014.LOG - S0000014.LOG
 Last committed transaction             = 2012-12-25-10.58.47.000000 Local

DB20000I  The ROLLFORWARD command completed successfully.

c:\>db2 rollforward db JEPRODB stop

                                 Rollforward Status

 Input database alias                   = JEPRODB
 Number of nodes have returned status   = 1

 Node number                            = 0
 Rollforward status                     = not pending
 Next log file to be read               =
 Log files processed                    = S0000014.LOG - S0000014.LOG
 Last committed transaction             = 2012-12-25-10.58.47.000000 Local

DB20000I  The ROLLFORWARD command completed successfully.

4,验证恢复结果
c:\>db2 connect to JEPRODB user db2admin using Amaxgs123


   Database Connection Information

 Database server        = DB2/NT 9.5.1
 SQL authorization ID   = DB2ADMIN
 Local database alias   = JEPRODB
c:\>db2 select current schema from sysibm.dual

1
--------------------------------------------------------------------------------------------------------------------------------
DB2ADMIN

  1 record(s) selected.


c:\>db2 list tables

Table/View                      Schema          Type  Creation time
------------------------------- --------------- ----- --------------------------
T2                              DB2ADMIN        T     2012-12-21-13.31.08.828001
T3                              DB2ADMIN        T     2012-12-20-17.09.33.531001

  2 record(s) selected.

c:\>db2pd -db JEPRODB -tablespaces

Database Partition 0 -- Database JEPRODB -- Active -- Up 0 days 00:01:54

Tablespace Configuration:
Address    Id    Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe  LastConsecPg Name
0xFCB58050 0     DMS  Regular 8192   4        Yes  4        1     1         Off 1        0          3            SYSCATSPACE
0xFCB58840 1     SMS  SysTmp  8192   32       Yes  32       1     1         On  1        0          31           TEMPSPACE1
0xFCB5D020 2     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           USERSPACE1
0xFCB5D810 3     DMS  Large   8192   4        Yes  4        1     1         Off 1        0          3            SYSTOOLSPACE
0xFCB5E000 4     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           DATA
0xFCB5E7F0 5     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           INDX
0xFCB5EFE0 6     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           EXAMPLE
0xFCB5F7D0 7     DMS  Large   8192   32       Yes  32       1     1         Off 1        0          31           DEANZA
0xFA010060 8     SMS  Regular 8192   32       Yes  32       1     1         Off 1        0          31           BIZTALK
0xFA012820 9     SMS  UsrTmp  8192   4        Yes  4        1     1         On  1        0          3            SYSTOOLSTMPSPACE

Tablespace Statistics:
Address    Id    TotalPgs   UsablePgs  UsedPgs    PndFreePgs FreePgs    HWM        State      MinRecTime NQuiescers
0xFCB58050 0     8192       8188       7308       0          880        7308       0x00000000 0          0
0xFCB58840 1     1          1          1          0          0          0          0x00000000 0          0
0xFCB5D020 2     4096       4064       160        0          3904       160        0x00000000 1355985382 0
0xFCB5D810 3     4096       4092       116        0          3976       116        0x00000000 0          0
0xFCB5E000 4     2048       2016       224        0          1792       224        0x00000000 1356067869 0
0xFCB5E7F0 5     4096       4064       96         0          3968       96         0x00000000 0          0
0xFCB5EFE0 6     12800      12768      96         0          12672      96         0x00000000 0          0
0xFCB5F7D0 7     12800      12768      96         0          12672      96         0x00000000 0          0
0xFA010060 8     1          1          1          0          0          0          0x00000000 0          0
0xFA012820 9     1          1          1          0          0          0          0x00000000 1356069253 0

Tablespace Autoresize Statistics:
Address    Id    AS  AR  InitSize    IncSize     IIP MaxSize     LastResize                 LRF
0xFCB58050 0     Yes Yes 33554432    -1          No  None        None                       No
0xFCB58840 1     Yes No  0           0           No  0           None                       No
0xFCB5D020 2     Yes Yes 33554432    -1          No  None        None                       No
0xFCB5D810 3     Yes Yes 33554432    -1          No  None        None                       No
0xFCB5E000 4     No  No  0           0           No  0           None                       No
0xFCB5E7F0 5     Yes Yes 33554432    -1          No  None        None                       No
0xFCB5EFE0 6     No  No  0           0           No  0           None                       No
0xFCB5F7D0 7     No  Yes 0           20971520    No  0           None                       No
0xFA010060 8     No  No  0           0           No  0           None                       No
0xFA012820 9     Yes No  0           0           No  0           None                       No

Containers:
Address    TspId ContainNum Type    TotalPgs   UseablePgs StripeSet  Container
0xFCB586D0 0     0          File    8192       8188       0          c:\INST1\NODE0000\JEPRODB\T0000000\C0000000.CAT
0xFCB58E70 1     0          Path    1          1          0          c:\INST1\NODE0000\JEPRODB\T0000001\C0000000.TMP
0xFCB5D6A0 2     0          File    4096       4064       0          c:\INST1\NODE0000\JEPRODB\T0000002\C0000000.LRG
0xFCB5DE90 3     0          File    4096       4092       0          c:\INST1\NODE0000\JEPRODB\T0000003\C0000000.LRG
0xFCB5E680 4     0          File    2048       2016       0          c:\INST1\node0000\jeprodb\data01
0xFCB5EE70 5     0          File    4096       4064       0          c:\INST1\NODE0000\JEPRODB\T0000005\C0000000.LRG
0xFCB5F660 6     0          File    12800      12768      0          c:\INST1\node0000\jeprodb\example.dbf
0xFCB5FE50 7     0          File    12800      12768      0          c:\INST1\node0000\jeprodb\DEANZA.DBF
0xFA010690 8     0          Path    1          1          0          c:\INST1\node0000\jeprodb\BIZTALK
0xFA012E50 9     0          Path    1          1          0          c:\INST1\NODE0000\JEPRODB\T0000009\C0000000.UTM
INST1_JEPRODB.ddl(编辑表空间路径为新数据库的表空间路径)
-- *****************************************************************************
-- ** automatically created redirect restore script
-- *****************************************************************************
UPDATE COMMAND OPTIONS USING S ON Z ON JEPRODB_NODE0000.out V ON;
SET CLIENT ATTACH_DBPARTITIONNUM  0;
SET CLIENT CONNECT_DBPARTITIONNUM 0;
-- *****************************************************************************
-- ** automatically created redirect restore script
-- *****************************************************************************
RESTORE DATABASE JEPRODB
-- USER  <username>
-- USING '<password>'
FROM 'c:\'
TAKEN AT 20121225105802
ON 'c:\'
DBPATH ON 'c:\'
INTO JEPRODB
-- LOGTARGET '<directory>'
-- NEWLOGPATH 'C:\INST1\NODE0000\SQL00001\SQLOGDIR\'
-- WITH <num-buff> BUFFERS
-- BUFFER <buffer-size>
-- REPLACE HISTORY FILE
-- REPLACE EXISTING
REDIRECT
-- PARALLELISM <n>
-- WITHOUT ROLLING FORWARD
-- WITHOUT PROMPTING
;
-- *****************************************************************************
-- ** table space definition
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = SYSCATSPACE
-- **   Tablespace ID                            = 0
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Regular table space.    
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 4
-- **   Using automatic storage                  = Yes     
-- **   Auto-resize enabled                      = Yes     
-- **   Total number of pages                    = 8192
-- **   Number of usable pages                   = 8188
-- **   High water mark (pages)                  = 7308
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = TEMPSPACE1
-- **   Tablespace ID                            = 1
-- **   Tablespace Type                          = System managed space                        
-- **   Tablespace Content Type                  = System Temporary data                       
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = Yes     
-- **   Total number of pages                    = 1
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = USERSPACE1
-- **   Tablespace ID                            = 2
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Large table space.      
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = Yes     
-- **   Auto-resize enabled                      = Yes     
-- **   Total number of pages                    = 4096
-- **   Number of usable pages                   = 4064
-- **   High water mark (pages)                  = 160
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = SYSTOOLSPACE
-- **   Tablespace ID                            = 3
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Large table space.      
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 4
-- **   Using automatic storage                  = Yes     
-- **   Auto-resize enabled                      = Yes     
-- **   Total number of pages                    = 4096
-- **   Number of usable pages                   = 4092
-- **   High water mark (pages)                  = 116
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = DATA
-- **   Tablespace ID                            = 4
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Large table space.      
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No      
-- **   Auto-resize enabled                      = No      
-- **   Total number of pages                    = 2048
-- **   Number of usable pages                   = 2016
-- **   High water mark (pages)                  = 224
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 4
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
  FILE   'c:\INST1\node0000\jeprodb\data01'                                   2048
);
-- *****************************************************************************
-- ** Tablespace name                            = INDX
-- **   Tablespace ID                            = 5
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Large table space.      
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = Yes     
-- **   Auto-resize enabled                      = Yes     
-- **   Total number of pages                    = 4096
-- **   Number of usable pages                   = 4064
-- **   High water mark (pages)                  = 96
-- *****************************************************************************
-- *****************************************************************************
-- ** Tablespace name                            = EXAMPLE
-- **   Tablespace ID                            = 6
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Large table space.      
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No      
-- **   Auto-resize enabled                      = No      
-- **   Total number of pages                    = 12800
-- **   Number of usable pages                   = 12768
-- **   High water mark (pages)                  = 96
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 6
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
  FILE   'c:\INST1\node0000\jeprodb\example.dbf'                             12800
);
-- *****************************************************************************
-- ** Tablespace name                            = DEANZA
-- **   Tablespace ID                            = 7
-- **   Tablespace Type                          = Database managed space                      
-- **   Tablespace Content Type                  = All permanent data. Large table space.      
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No      
-- **   Auto-resize enabled                      = Yes     
-- **   Total number of pages                    = 12800
-- **   Number of usable pages                   = 12768
-- **   High water mark (pages)                  = 96
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 7
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
  FILE   'c:\INST1\node0000\jeprodb\DEANZA.DBF'                              12800
);
-- *****************************************************************************
-- ** Tablespace name                            = BIZTALK
-- **   Tablespace ID                            = 8
-- **   Tablespace Type                          = System managed space                        
-- **   Tablespace Content Type                  = All permanent data. Regular table space.    
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 32
-- **   Using automatic storage                  = No      
-- **   Total number of pages                    = 1
-- *****************************************************************************
SET TABLESPACE CONTAINERS FOR 8
-- IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (
  PATH   'c:\INST1\node0000\jeprodb\BIZTALK'
);
-- *****************************************************************************
-- ** Tablespace name                            = SYSTOOLSTMPSPACE
-- **   Tablespace ID                            = 9
-- **   Tablespace Type                          = System managed space                        
-- **   Tablespace Content Type                  = User Temporary data                         
-- **   Tablespace Page size (bytes)             = 8192
-- **   Tablespace Extent size (pages)           = 4
-- **   Using automatic storage                  = Yes     
-- **   Total number of pages                    = 1
-- *****************************************************************************
-- *****************************************************************************
-- ** start redirected restore
-- *****************************************************************************
RESTORE DATABASE JEPRODB CONTINUE;
-- *****************************************************************************
-- ** end of file
-- *****************************************************************************

目标数据库:不同名数据库恢复DB2:JEODSDB => INST1:PEODS

实例名:INST1
数据库名:PEODS
初始状态
C:\Users\Administrator>db2 list history backup all for JEODSDB

                    List History File for JEODSDB

Number of matching file entries = 2


 Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID
 -- --- ------------------ ---- --- ------------ ------------ --------------
  B  D  20121218170050001   F    D  S0000000.LOG S0000000.LOG
 ----------------------------------------------------------------------------
  Contains 3 tablespace(s):

  00001 SYSCATSPACE
  00002 USERSPACE1
  00003 SYSTOOLSPACE
 ----------------------------------------------------------------------------
    Comment: DB2 BACKUP JEODSDB OFFLINE
 Start Time: 20121218170050
   End Time: 20121218170311
     Status: A
 ----------------------------------------------------------------------------
  EID: 2 Location: C:\DB2\NODE0000\JEODSDB\BACKUP


 Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log  Backup ID
 -- --- ------------------ ---- --- ------------ ------------ --------------
  B  D  20121226111752001   N    D  S0000002.LOG S0000002.LOG
 ----------------------------------------------------------------------------
  Contains 4 tablespace(s):

  00001 SYSCATSPACE
  00002 USERSPACE1
  00003 SYSTOOLSPACE
  00004 DATA
 ----------------------------------------------------------------------------
    Comment: DB2 BACKUP JEODSDB ONLINE
 Start Time: 20121226111752
   End Time: 20121226111929
     Status: A
 ----------------------------------------------------------------------------
  EID: 5 Location: C:\DB2\NODE0000\JEODSDB\BACKUP
 
C:\Users\Administrator>echo %date%
Wed 12/26/2012

C:\Users\Administrator>echo %time%
11:26:29.03

C:\Users\Administrator>db2 insert into ODS_T1 (id,name) values (1,'JERON')
DB20000I  The SQL command completed successfully.

C:\Users\Administrator>db2 commit
DB20000I  The SQL command completed successfully.

将DB2的JEODSDB恢复到INST1的PEODS数据库
C:\>db2 restore db JEODSDB from C:\ taken at 20121226111752 on C:\ into PEODS
SQL2563W  The restore process has completed successfully, but one or more
table spaces from the backup were not restored.

C:\>db2 restore db JEODSDB from C:\ taken at 20121226111752 on C:\ into PEODS logtarget C:\INST1\NODE0000\SQL00002\SQLOGDIR
SQL2528W  Warning!  Restoring to an existing database that is the same as the
backup image database, but the alias name "PEODS" of the existing database
does not match the alias "JEODSDB" of backup image, and the database name
"PEODS" of the existing database does not match the database name "JEODSDB" of
the backup image.  The target database will be overwritten by the backup
version.
Do you want to continue ? (y/n) Y
SQL2563W  The restore process has completed successfully, but one or more
table spaces from the backup were not restored.

C:\>db2 restore db JEODSDB from C:\ taken at 20121226111752 on C:\ into PEODS redirect generate script INST1_PEODS.ddl
DB20000I  The RESTORE DATABASE command completed successfully.

C:\>db2 -tvf INST1_PEODS.ddl
UPDATE COMMAND OPTIONS USING S ON Z ON JEODSDB_NODE0000.out V ON
DB20000I  The UPDATE COMMAND OPTIONS command completed successfully.

SET CLIENT ATTACH_DBPARTITIONNUM  0
DB20000I  The SET CLIENT command completed successfully.

SET CLIENT CONNECT_DBPARTITIONNUM 0
DB20000I  The SET CLIENT command completed successfully.

RESTORE DATABASE JEODSDB FROM 'C:\' TAKEN AT 20121226111752 ON 'C:\' DBPATH ON 'C:\' INTO PEODS REDIRECT
SQL2528W  Warning!  Restoring to an existing database that is the same as the
backup image database, but the alias name "PEODS" of the existing database
does not match the alias "JEODSDB" of backup image, and the database name
"PEODS" of the existing database does not match the database name "JEODSDB" of
the backup image.  The target database will be overwritten by the backup
version.
Do you want to continue ? (y/n) y
SQL1277W  A redirected restore operation is being performed.  Table space
configuration can now be viewed and table spaces that do not use automatic
storage can have their containers reconfigured.
DB20000I  The RESTORE DATABASE command completed successfully.

SET TABLESPACE CONTAINERS FOR 4 USING ( FILE   'C:\INST1\NODE0000\PEODS\DATA.dbf'                                 2560 )
DB20000I  The SET TABLESPACE CONTAINERS command completed successfully.

RESTORE DATABASE JEODSDB CONTINUE
DB20000I  The RESTORE DATABASE command completed successfully.

C:\>db2 rollforward db PEODS to end of logs

                                 Rollforward Status

 Input database alias                   = PEODS
 Number of nodes have returned status   = 1

 Node number                            = 0
 Rollforward status                     = DB  working
 Next log file to be read               = S0000003.LOG
 Log files processed                    = S0000002.LOG - S0000002.LOG
 Last committed transaction             = 2012-12-26-03.19.21.000000 UTC

DB20000I  The ROLLFORWARD command completed successfully.

C:\>db2 connect to PEODS user db2admin using Amaxgs123
SQL1117N  A connection to or activation of database "PEODS" cannot be made
because of ROLL-FORWARD PENDING.  SQLSTATE=57019

C:\>db2 rollforward db PEODS stop

                                 Rollforward Status

 Input database alias                   = PEODS
 Number of nodes have returned status   = 1

 Node number                            = 0
 Rollforward status                     = not pending
 Next log file to be read               =
 Log files processed                    = S0000002.LOG - S0000002.LOG
 Last committed transaction             = 2012-12-26-03.19.21.000000 UTC

DB20000I  The ROLLFORWARD command completed successfully.

C:\>db2 connect to PEODS user db2admin using Amaxgs123

   Database Connection Information

 Database server        = DB2/NT 9.5.1
 SQL authorization ID   = DB2ADMIN
 Local database alias   = PEODS

结果如下
C:\>db2 list tables

Table/View                      Schema          Type  Creation time
------------------------------- --------------- ----- --------------------------
ODS_T1                          DB2ADMIN        T     2012-12-26-10.55.19.296000

  1 record(s) selected.

C:\>db2 select * from ods_t1

ID          NAME
----------- --------------------

  0 record(s) selected.
至此成功恢复到备份的最后状态。

另外如果在停止前滚之前,将活动的日志也拷贝到当前日志目录进行回滚,则如下。
c:\>db2 rollforward db PEODS to end of logs

                                 Rollforward Status

 Input database alias                   = PEODS
 Number of nodes have returned status   = 1

 Node number                            = 0
 Rollforward status                     = DB  working
 Next log file to be read               = S0000003.LOG
 Log files processed                    = S0000002.LOG - S0000003.LOG
 Last committed transaction             = 2012-12-26-03.24.37.000000 UTC

DB20000I  The ROLLFORWARD command completed successfully.

c:\>db2 rollforward db PEODS stop

                                 Rollforward Status

 Input database alias                   = PEODS
 Number of nodes have returned status   = 1

 Node number                            = 0
 Rollforward status                     = not pending
 Next log file to be read               =
 Log files processed                    = S0000002.LOG - S0000003.LOG
 Last committed transaction             = 2012-12-26-03.24.37.000000 UTC

DB20000I  The ROLLFORWARD command completed successfully.

结果会不一样,与我最后一次提交的数据一致,则实现了完全恢复。
c:\>db2 connect to PEODS user db2admin using Amaxgs123

   Database Connection Information

 Database server        = DB2/NT 9.5.1
 SQL authorization ID   = DB2ADMIN
 Local database alias   = PEODS

c:\>db2 list tables

Table/View                      Schema          Type  Creation time
------------------------------- --------------- ----- --------------------------
ODS_T1                          DB2ADMIN        T     2012-12-26-10.55.19.296000

  1 record(s) selected.


c:\>db2 select * from ods_t1

ID          NAME
----------- --------------------
          1 JERON

  1 record(s) selected.

DB2数据库回滚方法及回滚实例 1、还原数据库db2 restore db dc from /db2_backup/dc taken at 20121102142900 with 1 buffers buffer 2562、回滚数据库,1&gt;和2&gt;只执行其一。1&gt;、作用是将数据库回滚到最新日志时间db2 rollforward db dc to end of logs and stop2&gt;、作用将数据库... 阅读详情

相关推荐

net操作db2数据库

这是最简单(不用安装db2客户端,不用安装任何驱动,有了这个类库就可以了),效率最高(目前至少咱没发现比这个更高的,比obdc连接效率要高很多),使用很方便,把这个文件下载下来,放在项目的中(一般放在bin文件夹中),添加引用后就可以在写c#程序操作db2数据库了,内有详细使用说明!

SQL问题解决

一、除非同时指定了 TOP,否则 ORDER BY 子句在视图、内嵌函数、派生表和子查询中无效。 select top 2 * from(select * from tblname order by id desc) as t --此代码会报以上错误 加 top 100 percent就可以了,例如 select top 2 * from(select top 100 percent * f

LWBNetwork 1128

【密码专栏】超强进阶:PLONK VS Groth16(上)

前言 前文《天冷了,干了这碗“零知识证明”鸡汤》对「零知识证明学习」作了一个形象化的比喻:炖鸡汤。那么本系列的主要内容可以简单概括为《论高压锅炖鸡汤的一百种方法》之方法二。在学会了“清炖鸡汤”之后,不如来一口“阿胶鸡汤”补补脑细胞吧! 正如鸡汤不同风味之间各具千秋,不同的zk-SNARK方案也各有所长。zk-SNARK方案可以被分为【通用】与【非通用】zk-SNARK,PLONK与Groth16分别是其中的典型代表。通过本系列,我们将对PLONK算法内容作简要介绍,并指出PLONK和Groth16算法思路上

Hyperchain的博客 1812

用备份复原数据库

首先把备份放在excel里面,然后用

u011228110的专栏 439

线性调频LFM脉冲压缩 连续波雷达仿真&线性调频信号仿真分析压缩matlab程序源码

13、线性调频信号(LFM)压缩感知的稀疏与重构算法(OMP)的matlab仿真程序(一个可以在matlab上运行的压缩感知实例;8、具有多普勒频移的线性调频信号(知道带宽、采样频率、T使用MATLAB仿真线性调频信号即LFM,同时具有多普勒频移时,匹配滤波后的波形变化。19、CW脉冲和LFM信号Matlab仿真(这是matlab仿真程序,实现了常规雷达信号CW和线性调频信号LFM的仿真)18、lfm信号模糊函数图 matlab(用matlab 实现的线性调频信号信号(lfm)的模糊函数图)

2301_77866396的博客 414

银河麒麟V10新特性解析:从安装到AI应用的全面指南

本文全面解析银河麒麟V10操作系统的新特性,从安装指南到AI应用开发,详细介绍了其智能调度引擎、神经网络加速和场景化AI工具集等核心功能。通过实战案例展示如何高效配置AI环境、优化性能,并解决常见问题,助力开发者在国产操作系统上实现高效AI开发与应用部署。

seed的博客 306

Db2重定向恢复显示成功,但连库却报SQL1119N

问题描述: Db2重定向恢复的命令都没有报错(Error),显示成功,但连库却报SQL1119N: A connection to or activation of database "SAMPLE1" cannot be made because a previous restore is incomplete or still in progress.Session 1:inst105@db2...

匿_名_用_户的专栏 1万+

sphincs+ Nist Round3文档中文译版(SPHINCS+ Submission to the NIST post-quantum project, v.3)

1. 引言 哈希基础签名方案最初是由Lamport [14]在1970年代后期作为一次性签名方案开发的,并由Merkle [16]扩展为多次签名方案。这些方案的安全性易于分析,并仅依赖于所使用的哈希函数的属性。然而,Merkle基于树的签名方案需要在密钥生成时就确定要进行签名的数量,且为了保持性能这个数字要小。最重要的是,该系统需要用户记住一个状态:这个状态包含一些信息以记住密钥已经进行了多少次签名。 在Lamport方案诞生后的40年里,产生了许多想法改进了哈希基础签名的性能、实用性和理论基础,最终XMS

dedanddwb的博客 398

DB2 只进行单个表空间的恢复

问题:我有一个DB2的备份要拿到新环境来恢复,但由于某些原因,比如磁盘空间不足,只想恢复其中的一个表空间,如何做? 方法:可以使用表空间级别的恢复,测试过程如下 1.) 查看当前数据库的状态,备份、并删除数据库 $ db2pd -db test -tab Database Member 0 -- Database TEST -- Active -- Up 0 day

匿_名_用_户的专栏 6222

Android15音频进阶之AudioReach架构agmcap bringup调试(一百二十三)

本篇目的:Android15音频进阶之AudioReach架构agmcap录音调试。

Android系统攻城狮 2239

5G无线关键技术 — 新型传输波形技术和先进编码与调制技术

目录 1、OFDM传输波形技术 2、滤波器组多载波 (Filterbank multicarrier:FBMC) 3、先进编码与调制技术 4、空间调制(Spatial Modulation SM) 5、频率正交幅度调制 1、OFDM传输波形技术 OFDM是当前Wi-Fi和LTE标准中的高速无线通信的主要传信模式。 LTECP配置 子载波间隔 CP长度Tcp 有用符号长度Tu CP比例..

Fanjufei的博客 2134

DB2数据库的备份与恢复

1.恢复数据库 1.拷贝数据库至DB2服务器,例如路径“C:\Users\Administrator”下 2.打开“db2cmd”,默认路径就是上面的例子,如数据库不在这个目录下,需切换目录 在“D:\DB2\IBM\SQLLIB\license”路径下不存在数据库映像文件,恢复失败,输入命令切换路径 3.列出所有对数据库的连接:db2 list applications 4.输入“db2 restore db AUTOSR taken at 20220221103759”,回车,稍等几分钟,日.

zj_C_的博客 1万+

Xilinx高级调试方法--远程调试

本文主要介绍Xilinx的一些高级调试方法,以及如何使用Xilinx的相关IP。

斌赋的博客 3334

DB2的备份(backup)和恢复(RESTORE)数据库方法

DB2的备份(backup)和恢复(RESTORE)数据库方法

qq_44884577的博客 5737

Python爬虫实战:新浪财经股票金融数据全方位抓取教程

本教程系统介绍了新浪财经股票数据爬取技术,从静态网页解析、实时接口请求到异步爬取和数据存储,帮助你搭建了一个完整的金融数据采集流程。未来,可以结合深度学习模型进行行情预测,或者将数据接入量化交易系统,实现自动化投资。

2201_76125261的博客 2210

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

db2重定向恢复及常见问题

前言 数据库管理和维护工作中一项重要的内容就是对数据库进行定期的备份和恢复。这种工作的重要性除了表现在数据的保全,系统的容灾方面,还表现在为应用系统的开发和测试搭建数据库环境。 设想在一个不断更新升级的应用环境中,数据库的数据在不断的更新,程序开发人员也在不断开发新的版本,建立测试数据和环境,对应用进行测试,再发布到生产环境下。这样,对于一个高复杂性的应用,使用生产环境中的真实数据来建立测试环境就变成了合理的选择。当然,在使用真实数据之前,为了保护公司利益可能需要删除或修改一些敏感的数据。 在上述场景下,数

huryer的专栏 2953

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

DB2 数据库在线备份和恢复的操作步骤

1、数据库在线备份操作命令如下: DB2 backup db 数据库名 online to 备份路径 例如:db2 backup db tony online to /home/db2inst/db2backup 2、数据库恢复操作命令如下: Db2 restore db 旧数据库名 taken at 时间戳 into 恢复数据库名

tony7706的博客 2万+

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

DB2数据库重定向表空间恢复实例

db2 restore database sino  into jinan3 redirect without rolling forwarddb2 "set tablespace containers for 2 using (file /opt/data/jinan3/ct/userspace1 65536, file /opt/data/jinan3/ct/userspace2

2930

如何彻底删除DB2中的Database以及DB2文件配置

如何彻底删除DB2中的Database以及DB2文件配置 Posted by MIB Admin on 二 - 26 - 2008 暂无评论 615 views 首先我不是专门做DB2的,只是工作中遇到了一些问题并且X文个DB2根本无法跟它沟通,所以对删除DB这个新手问题做一些个人解释。 背景操作(类似) 1、在“配置助手”中选择数据库A点击右键,选择“除去数据库” 2、

Jack-Win 1万+

DB2数据库常用命令及查询

1、 打开命令行窗口  #db2cmd 2、 打开控制中心  #db2cmd db2cc 3、 打开命令编辑器  #db2cmd db2ce =====操作数据库命令===== 4、 启动数据库实例  #db2start 5、 停止数据库实例  #db2stop  如果你不能停止数据库由于激活的连接,在运行db2stop前执行db2 force application ...

JinKin_OldWang的博客 1万+

DB2数据库备份恢复小结

一、离线全备 在控制台进入到DB2的BIN目录如:(D:/Program Files/IBM/SQLLIB/BIN),执行DB2 CONNECT TO DATABASE_NAME, 这时可能会出现“db2 未初始化命令行环境”的错误,既然是未初始化命令行环境,那么初始化命令行环境,即:DB2CMD; ①     连接一个已建立好的数据库,做一个离线的全备。 命令:DB2 CONNECT

seven 842

DB2数据库与表空间的恢复

DB2数据库与表空间的恢复 恢复历史记录文件 ​ 包含当数据库的所有或部分必须恢复到给定时间点时,可用来确定恢复选项的备份信息的摘要 ​ 用来跟踪其他操作中与恢复相关的事件,如备份和复原操作 ​ 文件位于数据库目录中,文件名是DB2RHIST.ASC及其备份 DB2RHIST.BAK ​ 要查看恢复历史记录文件中的条目,可使用 LIST HISTORY 命令 查看恢复历史纪录文件的语法 db2 ...

ggz 的博客 2402

db2 数据库备份与恢复参数详解

db2 备份参数详解,恢复操作,前滚操作详解。

william823的专栏 3103

DB2 数据库恢复测试

更新May 24, 今天在删除mydb1数据库之后想restore一下database mydb1,可以不知道是什么原因出现错误SQL2043N错误,开始怀疑是内存问题,但是我的SHMMAX和SHMALL参数都有设置的足够大,根据官方建议看是不是Address Space Layout Randomization ( ASLR )的问题,修改了之后还是解决不了问题,会不会是因为我之前drop

Jack-Win 2389

DB2数据库备份及恢复命令总结

1、运行-->db2cmd 2、命令行中输入db2cmd 输入命令 db2 create db 数据库名称 on d: 在d盘建立数据库。假设在d盘生成目录:D:/DB2/NODE0000/SQL00006 3、cd/ 4、保证D:/db_bak/目录下存在要恢复的数据

lchg66的专栏 1897

db2数据库创建、恢复及常用命令

一、删除数据库 --查看所有数据库:db2 list db directory --断开数据库连接:db2 connect reset --删除已存在的数据库:db2 drop database TESTDB。 如果执行失败可能是有数据库连接存在。执行db2stop force或者db2 force application all。再启动 db2start。删除数据库时,数据库所有表空间会自...

weixin_42755109的博客 1万+
上一篇: DB2备份集与归档日志的保留或删除
下一篇: DB2 managing user & privilege
deanza
博客等级 码龄18年 14粉丝 134原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值