Professional Documents
Culture Documents
db2 Working in Lab
db2 Working in Lab
------ Shared Memory Limits ------ Semaphore Limits ------ Messages: Limits --------
-------- -------- max queues system wide =
max number of segments = max number of arrays = 1024 1737
4096 max semaphores per array = max size of message (bytes) =
max seg size (kbytes) = 250 65536
1031316 max semaphores system wide default max size of queue
max total shared memory = 256000 (bytes) = 65536
(kbytes) = 8388608 max ops per semop call = 32
min seg size (bytes) = 1 semaphore max value = 32767
A minor error occurred while installing "DB2 Enterprise Server Edition " on
this computer. Some features may not function correctly.
For more information see the DB2 installation log at
"/tmp/db2_install.log.8878".
DB2LS
[db2inst1@localhost ~]$ db2ls
Install Path Level Fix Pack Special Install Number Install Date
Installer UID
---------------------------------------------------------------------------------------------------------------------
/opt/ibm/db2/V10.1 10.1.0.0 0 Mon Apr 13 04:54:13 2015 PDT
0
DEINSTALL
[arjun@localhost ~]$ ls
Desktop
[arjun@localhost ~]$ cd Desktop/
[arjun@localhost Desktop]$ ls
server v10.1_linuxia32_server.tar.gz v9.7_linuxia32_server.tar
[arjun@localhost Desktop]$ cd server/
[arjun@localhost server]$ su root
Password:
[root@localhost server]# db2ls
Install Path Level Fix Pack Special Install Number Install Date
Installer UID
---------------------------------------------------------------------------------------------------------------------
/opt/ibm/db2/V10.1 10.1.0.0 0 Mon Apr 13 04:54:13 2015 PDT
0
[root@localhost server]# ls
db2 db2_deinstall db2ls db2setup installFixPack
db2ckupgrade db2_install db2prereqcheck doc
DEINSTALL
[root@localhost server]# ./db2_deinstall -a
Enter full path name for the install directory -
------------------------------------------------
/opt/ibm/db2/V10.1
DBI1016I Program db2_deinstall is performing uninstallation. Please
wait.
The deinstallation process cannot continue while there are DB2 instances related to the current
DB2 copy.
If you need to move up or down a level from this DB2 level, use the installFixPack command
from the DB2 image for the level you desire to move to, which will update this copy.
If you are only trying to uninstall this DB2 copy, you must either drop the related instances first,
or you can update the instances to another DB2 copy which is at the same version as this DB2
copy, then restart the db2_deinstall command.
A major error occurred during the execution that caused this program to terminate prematurely.
If the problem persists, contact your technical service representative. For more information see
the DB2 uninstallation log at
"/tmp/db2_deinstall.log.32140".
[root@localhost server]# ./db2_deinstall -a -b /opt/ibm/db2/V10.1
DBI1016I Program db2_deinstall is performing uninstallation. Please wait.
The execution completed successfully.
For more information see the DB2 uninstallation log at
"/tmp/db2_deinstall.log.7482".
GENERATE RESPONSE FILE
[root@localhost ~]# mkdir 2ktech
[root@localhost ~]# su db2inst1
[db2inst1@localhost ~]$ db2rspgn -d /home/db2inst1/2ktech
DBI1070I Program db2rspgn completed successfully.
[db2inst1@localhost ~]$ cd /home/db2inst1/2ktech
[db2inst1@localhost 2ktech]$ ls
db2ese.rsp db2ge.INS db2inst1.INS db2inst2.INS
[db2inst1@localhost 2ktech]$ cat db2ese.rsp
INSTANCE
[root@localhost instance]# useradd db2inst1
[root@localhost instance]# useradd db2fnc1
[root@localhost ~]# cd /opt/ibm/db2/V10.1/instance
[root@localhost instance]# ./db2icrt -u db2fnc1 db2inst1
DBI1070I Program db2icrt completed successfully.
CHANGING PASSWORD
[db2inst1@localhost ~]$ su root
Password:
[root@localhost db2inst1]# cd
[root@localhost ~]# passwd db2inst1
Changing password for user db2inst1.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
SEE THE FENCED ID
cat /etc/passwd |grep -i f*
fenc1:x:501:501::/home/fenc1:/bin/bash
windows7:x:502:502::/home/windows7:/bin/bash
fenc2:x:503:503::/home/fenc2:/bin/bash
windows8:x:504:504::/home/windows8:/bin/bash
[db2inst1@localhost ~]$ db2pd -fmp
Database Member 0 -- Active -- Up 0 days 01:08:24 -- Date 04/13/2015 23:10:49
FMP:
Pool Size: 1
Max Pool Size: 200 ( Automatic )
Keep FMP: YES
Initialized: YES
Trusted Path: /home/db2inst1/sqllib/function/unfenced
Fenced User: db2fnc1
Shared Memory: 0x117B03C0
IPC Pool: 0x117B0400
DB2ILIST
[db2inst1@localhost ~]$ db2ilist
db2inst2
db2inst1
DB2START; DB2STOP
[db2inst1@localhost ~]$ db2start
03/31/2015 23:25:35 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
[db2inst1@localhost ~]$ db2stop
04/01/2015 19:33:16 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
DB2 GET DBM CFG
[db2inst1@localhost ~]$ db2 get dbm cfg
Database Manager Configuration
CPU speed (millisec/instruction) (CPUSPEED) = 5.313873e-07
TCP/IP Service name (SVCENAME) =
Max number of concurrently active databases (NUMDB) = 32
Max number of concurrently active databases (NUMDB) = 8 (V9.7)
ALTER TABLESPACE
db2 LIST TABLESPACES SHOW DETAIL ALTER TABLESPACE <AIX > ADD
[db2inst1@localhost ~]$ db2 "alter tablespace
[db2inst1@localhost ~]$ db2 list tablespaces aix add (file '/home/db2red/cont9' 10000)"
show detail DB20000I The SQL command completed
Tablespace ID =5 successfully.
Name = AIX Tablespace ID =5
Type = Database Name = AIX
managed space Type = Database managed
Contents = All permanent space
data. Regular table space. Contents = All permanent
State = 0x0000 data. Regular table space.
Detailed explanation: State = 0x0000
Normal Detailed explanation:
Total pages = 10000 Normal
Useable pages = 9952 Total pages = 20000
Used pages = 9952 Useable pages = 19904
Free pages =0 Used pages = 9952
High water mark (pages) = 9952 Free pages = 9952
Page size (bytes) = 4096 High water mark (pages) = 9952
Extent size (pages) = 32 Page size (bytes) = 4096
Prefetch size (pages) = 32 Extent size (pages) = 32
Number of containers =1 Prefetch size (pages) = 64
Number of containers =2
[db2inst1@localhost ~]$ db2 "alter tablespace [db2inst1@localhost ~]$ db2 "alter tablespace
tab1 add (file '/home/db2inst1/aaa' 8 G)" tab1 resize (file '/home/db2inst1/aaa' 4 G)"
DB20000I The SQL command completed DB20000I The SQL command completed
successfully. successfully.
[db2inst1@localhost ~]$ db2 list tablespace [db2inst1@localhost ~]$ db2 list tablespace
containers for 4 show detail containers for 4 show detail
Tablespace Containers for Tablespace 4 Tablespace Containers for Tablespace 4
Container ID =0
Name = Container ID =0
/home/db2inst1/cont7 Name =
Type = File /home/db2inst1/cont7
Total pages = 2000000 Type = File
Useable pages = 1999968 Total pages = 2000000
Accessible = Yes Useable pages = 1999968
Container ID =1 Accessible = Yes
Name = Container ID =1
/home/db2inst1/aaa Name =
Type = File /home/db2inst1/aaa
Total pages = 2097152 Type = File
Useable pages = 2097120 Total pages = 1048576
Accessible = Yes Useable pages = 1048544
Accessible = Yes
REBALANCE
[db2inst1@localhost ~]$ db2 list tablespaces [db2inst1@localhost ~]$ db2 "alter stogroup
show detail stg1 add '/home/db2inst1/bdvpk'"
Tablespace ID =6 DB20000I The SQL command completed
Name = MYTAB2 successfully.
Type = Database managed [db2inst1@localhost ~]$ db2 "alter tablespace
space mytab2 rebalance"
Contents = All permanent DB20000I The SQL command completed
data. Regular table space. successfully.
State = 0x0000 [db2inst1@localhost ~]$ db2 list tablespaces
Detailed explanation: show detail
Normal Tablespace ID =6
Total pages = 3840 Name = MYTAB2
Useable pages = 3744 Type = Database managed
Used pages = 2496 space
Free pages = 1248 Contents = All permanent
High water mark (pages) = 2496 data. Regular table space.
Page size (bytes) = 4096 State = 0x0000
Extent size (pages) = 32 Detailed explanation:
Prefetch size (pages) = 96 Normal
Number of containers =3 Total pages = 5120
Useable pages = 4992
Used pages = 2496
Free pages = 2496
High water mark (pages) = 2496
Page size (bytes) = 4096
Extent size (pages) = 32
Prefetch size (pages) = 128
Number of containers =4
PREFETCHSIZE
[db2inst1@localhost ~]$ db2 "alter tablespace mytab3 prefetchsize 200"
DB20000I The SQL command completed successfully.
Tablespace ID =7 Tablespace ID =7
Name = MYTAB3 Name = MYTAB3
Type = Database managed Type = Database managed
space space
Contents = All permanent Contents = All permanent
data. Large table space. data. Large table space.
State = 0x0000 State = 0x0000
Detailed explanation: Detailed explanation:
Normal Normal
Total pages = 200000 Total pages = 200000
Useable pages = 199968 Useable pages = 199968
Used pages = 96 Used pages = 96
Free pages = 199872 Free pages = 199872
High water mark (pages) = 96 High water mark (pages) = 96
Page size (bytes) = 4096 Page size (bytes) = 4096
Extent size (pages) = 32 Extent size (pages) = 32
Prefetch size (pages) = 400 Prefetch size (pages) = 200
Number of containers =1 Number of containers =1
BUFFERPOOL
[db2inst1@localhost ~]$ db2 create bufferpool bp1 size 2000 pagesize 4 k
DB20000I The SQL command completed successfully.
[db2inst1@localhost ~]$ db2 alter tablespace mytab3 bufferpool bp1
DB20000I The SQL command completed successfully.
0xA8BBA540 7 DMS Large 4096 32 No 200 1 2 Off 1 0 31
MYTAB3
[db2inst1@localhost ~]$ db2 "select tbspace,bufferpoolid from syscat.tablespaces"
TBSPACE BUFFERPOOLID
-------------------------------------------------------------------------------------------------------------------
SYSCATSPACE 1
TEMPSPACE1 1
USERSPACE1 1
SYSTOOLSPACE 1
MYTAB2 1
MYTAB3 2
8 record(s) selected.
[db2inst1@localhost ~]$ db2 "select bpname,bufferpoolid from syscat.bufferpools"
BPNAME BUFFERPOOLID
IBMDEFAULTBP 1
BP1 2
OVERHED
[db2inst1@localhost ~]$ db2 alter tablespace mytab3 overhead 40
DB20000I The SQL command completed successfully.
[db2inst1@localhost ~]$ db2 alter tablespace mytab3 overhead 20
DB20000I The SQL command completed successfully.
TRANSDERATE
[db2inst1@localhost ~]$ db2 alter tablespace mytab3 transferrate 30
DB20000I The SQL command completed successfully
SWITCH ONLINE
MAXSIZE
CONCERT TO LARGE
[db2inst1@localhost ~]$ db2 "alter table space mytab1 convert to large"
SQL1237W Table space "MYTAB1" is being converted from REGULAR to LARGE. Indexes
on tables in this table space must be reorganized or rebuilt to support large RIDs.
SQLSTATE=01686
BUFFERPOOL
[db2inst1@localhost ~]$ db2 "select * from syscat.bufferpools"
BPNAME BUFFERPOOLID
DBPGNAME
S BLOCKSIZE NGNAME NPAGES PAGESIZE ESTORE
NUMBLOCKPAGE
---------------------------------------------------------------------------------------------------------------------
IBMDEFAULTBP 1-
0 0- -2 4096 N
1 record(s) selected.
CREATE BUFFERPOOL:
[db2inst1@localhost ~]$ db2 "create bufferpool gebp pagesize 8 k"
DB20000I The SQL command completed successfully.
SEHEMA
[db2inst1@localhost ~]$ db2 "select schemaname from syscat.schemata"
SCHEMANAME
NULLID Sysstat
SQLJ Sysfun
SYSCAT Sysibm
SYSFUN Syscat
SYSIBM Sysibmadm
SYSIBMADM OWNER SYSIBM
SYSIBMINTERNAL
SYSIBMTS
SYSPROC
SYSPUBLIC
SYSSTAT
SYSTOOLS
12 record(s) selected.
CREATE SCHEMA
[db2inst1@localhost ~]$ db2 "create schema geschema "
DB20000I the SQL command completed successfully.
DB2 LIST APPLICATION SHOW DETAIL
[db2inst1@localhost ~]$ db2 list application show detail
CONNECT Auth Id
Application Name Appl. Application Id Seq# Number of
Coordinating DB Coordinator Status Status Change Time DB Name DB
Path
Handle
Agents partition number pid/thread
---------------------------------------------------------------------------------------------------------------------
DB2INST1 db2wlmd
46 *LOCAL.DB2.150402074511 00001 1 0 84
Connect Completed Not Collected GEIS
/home/db2inst1/geidp/db2inst1/NODE0000/SQL00001/
DB2INST1 db2taskd
45 *LOCAL.DB2.150402074510 00001 1 0 83
Connect Completed Not Collected GEIS
/home/db2inst1/geidp/db2inst1/NODE0000/SQL00001/
DB2INST1 db2stmm
44 *LOCAL.DB2.150402074509 00001 1 0 74
Connect Completed Not Colle
TABLES
CREATE TABLE
[db2inst1@localhost ~]$ db2 "create table emp (id int, name varchar(50),jobrole
varchar(30),joindate date, salary int) in aix "
[db2inst1@localhost ~]$ db2 "insert into emp values (08,'abh','dba','08/08/2011',40000)"
DB20000I The SQL command completed successfully.
PRIMARY KEY TABLE
[db2inst1@localhost ~]$ db2 "create table PRIMARY (id int not null, name varchar(50),jobrole
varchar(30),joindate date, salary int,PRIMARY KEY(id)) in mytab2 "
DB20000I The SQL command completed successfully.
FOREIGN KEY TABL
[db2inst1@localhost ~]$ db2 "create table kattas (id int ,name varchar(50),jobrole
varchar(30),joindate date, salary int) in mytab2 "
DB20000I The SQL command completed successfully.
[db2inst1@localhost ~]$ db2 "alter table kattas add constraint dba foreign key (id) references
katta(id)"
DB20000I The SQL command completed successfully.
DB2 LIST TABLES
[db2inst1@localhost ~]$ db2 list tables
Table/View Schema Type Creation time
------------------------------- --------------- ----- --------------------------
0 record(s) selected.
Listing table details
db2 select tabname, tabschema, tbspace from syscat.tables
EMP WINDOWS7 SAP
TEST WINDOWS7 SAP
KATTA WINDOWS7 AIX
ABC WINDOWS7 AIX
Db2 load query table <table name>
BACKUPS
OFFLINE BACKUP
[db2inst1@localhost ~]$ db2 backup db linux to /home/db2red/backup with 4 buffers buffer 8
without prompting
Backup successful. The timestamp for this backup image is : 20150407193238
ONLINE BACKUP
[db2inst1@localhost ~]$ db2 update db cfg using LOGARCHMETH1
disk:/home/windows7/log.out
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[windows7@localhost ~]$ db2 update db cfg using TRACKMOD yes
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[windows7@localhost ~]$ db2 update db cfg using SOFTMAX 256
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
[db2inst1@localhost ~]$ db2 backup db linux online to /home/db2red/backup with 4 buffers
buffer 8 without prompting
Backup successful. The timestamp for this backup image is : 20150407194332
ONLINE INCREMENTAL
[db2inst1@localhost ~]$ db2 update db cfg using TRACKMOD yes
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification were not
changed dynamically. For these configuration parameters, all applications must disconnect from
this database before the changes become
[db2inst1@localhost ~]$ db2 backup db linux online incremental to /home/db2red/backup with 4
buffers buffer 8 without prompting
Backup successful. The timestamp for this backup image is : 20150407194938
ONLINE INCREMENTAL DELTA
[db2inst1@localhost ~]$ db2 backup db linux online incremental delta to /home/db2red/backup
with 4 buffers buffer 8 without prompting
Backup successful. The timestamp for this backup image is : 20150407223654
TABLE SPACE LEVEL BACKUP
[db2inst1@localhost ~]$ db2 backup db linux tablespace sap online incremental to
/home/db2red/backup
Backup successful. The timestamp for this backup image is : 20150407224015
LIST HISTORY BACKUP
[db2inst1@localhost ~]$ db2 list history backup all for linux
List History File for linux
Number of matching file entries = 11
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20150421220806001 F D S0000000.LOG S0000000.LOG
----------------------------------------------------------------------------
Contains 6 tablespace(s):
00001 SYSCATSPACE
00002 USERSPACE1
00003 SYSTOOLSPACE
00004 MYTAB
00005 MYTAB1
00006 MYTAB3
----------------------------------------------------------------------------
Comment: DB2 BACKUP LINUX OFFLINE
Start Time: 20150421220806
End Time: 20150421220817
Status: A
----------------------------------------------------------------------------
EID: 12 Location: /home/db2inst1/backup
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20150421220837001 N D S0000000.LOG S0000000.LOG
----------------------------------------------------------------------------
Contains 6 tablespace(s):
00001 SYSCATSPACE
00002 USERSPACE1
00003 SYSTOOLSPACE
00004 MYTAB
00005 MYTAB1
00006 MYTAB3
----------------------------------------------------------------------------
Comment: DB2 BACKUP LINUX ONLINE
Start Time: 20150421220837
End Time: 20150421220848
Status: A
----------------------------------------------------------------------------
EID: 15 Location: /home/db2inst1/backup
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20150421222230000 O S0000000.LOG S0000000.LOG
----------------------------------------------------------------------------
Comment: DB2 BACKUP LINUX ONLINE
DB2CKBKP
[db2inst1@localhost ~]$ cd backup
[db2red@localhost backup]$ ls -ltr
total 1037384
-rw------- 1 db2red db2red 346378240 Apr 7 19:33
LINUX.0.db2red.NODE0000.CATN0000.20150407193238.001
-rw------- 1 db2red db2red 346411008 Apr 7 19:43
LINUX.0.db2red.NODE0000.CATN0000.20150407194243.001
-rw------- 1 db2red db2red 346443776 Apr 7 19:44
LINUX.0.db2red.NODE0000.CATN0000.20150407194332.001
-rw------- 1 db2red db2red 3788800 Apr 7 19:49
LINUX.0.db2red.NODE0000.CATN0000.20150407194938.001
-rw------- 1 db2red db2red 3198976 Apr 7 22:36
LINUX.0.db2red.NODE0000.CATN0000.20150407223654.001
-rw------- 1 db2red db2red 14974976 Apr 7 22:40
LINUX.3.db2red.NODE0000.CATN0000.20150407224015.001
[db2red@localhost backup]$ db2ckbkp
LINUX.3.db2red.NODE0000.CATN0000.20150407224015.001
[1] Buffers processed: ####
Image Verification Complete - successful.
DB2 GET DB CFG SHOW DETAIL
[db2inst1@localhost ~]$ db2 get db cfg show detail
Database Configuration for Database
Description Parameter Current Value Delayed Value
---------------------------------------------------------------------------------------------------------------
Database collating sequence = IDENTITY IDENTITY
Changed path to log files (NEWLOGPATH) =
/home/db2red/log/NODE0000/
Log retain for recovery enabled (LOGRETAIN) = off RECOVERY
First log archive method (LOGARCHMETH1) = off LOGRETAIN
Track modified pages (TRACKMOD) = no YES
DB2 MOVEMENT UTILITIES
EXPORT
[db2inst1@localhost ~]$ db2 "export to myfile.ixf of ixf messages msgs.txt select * from test"
[db2inst1@localhost ~]$ db2 "export to myfiles.del of del modified by coldel; messages msgs.txt select *
from test"
Output
1;"aaa";"dba";20110101;10000
2;"bbb";"dba";20110202;20000
3;"ccc";"dba";20110303;30000
4;"ddd";"dba";20110404;40000
5;"eee";"dba";20110505;50000
6;"fff";"dba";20110606;60000
7;"ggg";"dba";20110707;70000
8;"hhh";"dba";20110808;80000
9;"iii";"dba";20110909;90000
IMPORT
[db2inst1@localhost ~]$ db2 import from myfile.ixf of ixf messages msg.txt "create into katta"
LOAD (copy yes option that time all table spaces in normal state)
[db2inst1@localhost ~]$ db2 "load from myfile.ixf of ixf savecount 10000 tempfiles path
/home/db2inst1/111 insert into emp copy yes to /home/db2inst1/333"
SQL3110N The utility has completed processing. "2064384" rows were read from the input file.
SQL3515W The utility has finished the "LOAD" phase at time "04/16/2015
01:46:57.473913".
5 record(s) selected.
-----------
2064384
1 record(s) selected.
[db2inst1@localhost ~]$ db2 "load from myfile.ixf of ixf savecount 10000 tempfiles path
/home/db2inst1/111 insert into emp1 “
Tablespace ID =4
Name = TAB1
State = 0x0020
Detailed explanation:
Backup pending
Tablespace ID =4
Name = TAB1
State = 0x0000
Detailed explanation:
Normal
[db2inst1@localhost ~]$ db2 "create table tb2 (id int not null, name varchar(20),primary key(id))"
[db2inst1@localhost ~]$ db2 "create table tb3 (id int, name varchar(20))"DB20000I The SQL command
completed successfully.
[db2inst1@localhost ~]$ db2 "alter table tb3 add constraint fk foreign key(id) references tb2(id)"
[db2inst1@localhost ~]$
[db2inst1@localhost ~]$ db2 "load from k12.ixf of ixf insert into tb1"
"/home/db2inst1/k12.ixf".
SQL3500W The utility is beginning the "LOAD" phase at time "04/16/2015 02:20:39.114074".
SQL3150N The H record in the PC/IXF file has product "DB2 02.00", date "20150416", and time
"021934".
SQL3153N The T record in the PC/IXF file has name "k12.ixf", qualifier "", and source " ".
SQL3110N The utility has completed processing. "1" rows were read from the input file.
SQL3515W The utility has finished the "LOAD" phase at time "04/16/2015 02:20:39.307473".
Tablespace ID =4
Name = TAB1
State = 0x0020
Detailed explanation:
Backup pending
CURSOR LOAD
[db2inst1@localhost ~]$ db2 "declare cu2 cursor database linux user db2inst1 using db2inst1 for select
* from tb1 "
2 record(s) selected.
[db2inst1@localhost ~]$ db2 "create table tb11 (id int, name varchar(20))"
SQL3253N The utility is beginning to load data from the SQL statement " select * from tb1" in database
"linux".
SQL3500W The utility is beginning the "LOAD" phase at time "04/17/2015 03:05:58.161204".
SQL3110N The utility has completed processing. "1" rows were read from the input file.
SQL3515W The utility has finished the "LOAD" phase at time "04/17/2015 03:05:58.316679".
ID NAME
----------- --------------------
3 ddd
1 record(s) selected.
MOVE THE TABLE ONE INSTANCE TO ANOTHER INSTANCE WITH DB2MOVE OPTION
2 record(s) selected.
Action: EXPORT
Connecting to database LINUX ... successful! Server : DB2 Common Server V10.1.0
Password:
[root@localhost Desktop]# cd
[root@localhost db2inst2]# ls
[root@localhost 000]# ls
db2move.lst EXPORT.out tab1.ixf tab1.msg
Password:
[db2inst2@localhost Desktop]$ cd
[db2inst2@localhost ~]$ ls
Action: IMPORT
Connecting to database MYDBS ... successful! Server : DB2 Common Server V10.1.0
-Inserted: 2064384
-Rejected: 0
-Committed: 2064384
0 record(s) selected.
1 record(s) selected.
RESTORE
[db2inst1@localhost ~]$ db2 backup db linux online to /home/db2inst1/backup with 4 buffers buffer 8
without prompting
space restore, only table spaces being restored can have their paths
reconfigured. During a database restore, storage group storage paths and DMS
table space containers can be reconfigured.
DB20000I The SET TABLESPACE CONTAINERS command completed successfully. SET TABLESPACE
CONTAINERS FOR 5 USING ( FILE '/home/db2inst1/cont20' 200000 )
DB20000I The SET TABLESPACE CONTAINERS command completed successfully. SET TABLESPACE
CONTAINERS FOR 6 USING ( FILE '/home/db2inst1/cont50' 200000 )
the rollforward utility cannot reach the specified stop point (end-of-log or
Rollforward Status
Member ID =0
Rollforward Status
Member ID =0
[db2inst1@localhost log.out]$ ls
db2inst1 NODE0000
[db2inst1@localhost NODE0000]$ ls
LOGSTREAM0000
[db2inst1@localhost LOGSTREAM0000]$ ls
S0000019.LOG
[db2inst1@localhost LOGSTREAM0000]$ ls
S0000019.LOG
[db2inst1@localhost LOGSTREAM0000]$ cd
[db2inst1@localhost 123]$ ls
S0000019.LOG
[db2inst1@localhost 123]$ cd
[db2inst1@localhost ~]$ db2 "rollforward db windows to end of logs and complete overflow log path
(/home/db2inst1/123)"
[db2inst1@localhost ~]$ db2 "rollforward db windows to end of logs and complete overflow log path
(/home/db2inst1/123)"
Rollforward Status
Member ID =0
2 record(s) selected.
[db2inst1@localhost 000]$ ls
UNIX.0.db2inst1.DBPART000.20150422023228.001
Rollforward Status
Input database alias = unix
Member ID =0
the rollforward utility cannot reach the specified stop point (end-of-log or
Rollforward Status
Member ID =0
Rollforward Status
Input database alias = unix
Member ID =0
the rollforward utility cannot reach the specified stop point (end-of-log or
Rollforward Status
Member ID =0
[db2inst1@localhost LOGSTREAM0000]$ ls
db2inst2@localhost's password:
[db2inst2@localhost ~]$ db2 "rollforward db unix to end of logs and complete overflow log path
('/home/db2inst2/login')"
Rollforward Status
Member ID =0