IBM DB2 LUW DBA Tutorial -- Instance creation
/**
声明:此随笔为在youtube上学习‘ IBM DB2 LUW/UDB DBA Tutorial for Beginners' 课程笔记.
YouTube视频连接:https://www.youtube.com/watch?v=Pjvwm4rC5Ok&list=PLCNIKwM6iuv7g1hDWDcNkc66vZuVJmvZg
**/
1. Add user id(Use root on system):
useradd -d /home/db2inst1 db2inst1
passwd db2inst1
create some users like db2inst1
alkesh, db2inst3
2. Check the DB installation information:
db2ls
3. Go to db2 folder
cd /opt/ibm/db2/V10.5/
cd /instance
./db2icrt -h (help to create a new instance)
4. Create instance
./db2icrt -u alkesh db2inst3
5. Check logs(db2icrt.log.xxxxx)
cd /tmp
6. Login as instance owner
su - db2inst3
7. Start instance
db2start
--db2stop [stop instance]
ps -ef | grep db2sysc [db2sysc: db2 system controller]
8. Create a database
================================
CPU, I/O, memory
1 instance: 1 database
1 instance: 2 database (DATABASE_MEMORY)
9. Drop instance
db2ilist [ list all instance]
db2idrop -h
db2idrop db2inst1
10. Check global registry
db2greg -dump