SlideShare a Scribd company logo
1 of 20
DB2 for Linux, Unix, and
Windows
- Ravi
What is a Database Manager?
AGENDA!
Installation pre-requisites
CREATE/DROP
START/STOP
DBM Configuration
db2set command
db2 CLP history
Q&A
Logical database manager environment where we catalog databases and set configuration
parameters
Definition: DBM/Instance
Instance = Database(s) + Processes/Threads
Operating system:
- Red Hat Enterprise Linux (RHEL) 5 Update 2.0.4
- SUSE Linux Enterprise Server (SLES) 10 Service Pack 2
- SUSE Linux Enterprise Server (SLES) 11
- Ubuntu 8.0.4.1
Installation Pre-requisites (Linux!)
Disk space requirements: 500 to 1GB
Memory requirements: Minimum of 512 MB of RAM
Root (vs) Non-root installation
Users/Groups
Root (vs) Non-Root Installations
USERS/GROUPS
Only one instance can be created under a user name
db2icrt - Create Instance
Syntax:
Location: DB2DIR/instance directory.
Example: db2icrt -u db2fenc1 db2inst1
Removes a DB2 instance that was created by db2icrt.
db2idrop - Drop Instance
Syntax:
You can only drop instances that are listed by db2ilist command
Example: db2idrop db2inst1
Lists all the instances that are created using the db2icrt command
db2ilist - List Instances
Syntax:
$ db2ilist -h
$ db2ilist
db2inst1
db2inst2
Gets data from /var/db2/global.reg
db2greg -dump
Login as the DB2 instance owner
db2start - Start Instance
. $DB2_HOME/db2profile
db2start
Login as the DB2 instance owner
db2stop - Stop Instance
Make sure you have all applications disconnected (db2 list applications)
$ db2stop
$ db2stop force (= db2 force application all + db2stop)
$ db2_kill
$ db2 get instance
$ db2 ? get dbm cfg
GET DATABASE MANAGER CONFIGURATION [SHOW DETAIL]
$ db2 get dbm cfg
$ db2 get dbm cfg | grep NUMDB
$ db2 update dbm cfg using NUMDB 10
$ db2 attach to db2inst1
$ db2 get dbm cfg show detail
$ db2 reset dbm cfg
DBM CONFIGURATION
DB2SET
IBM DB2 profile registry command
Allows for centralized control of environmental variables
4 Profile registries:
- Instance level profile registry [i] (~/sqllib/profile.env)
- Global level profile registry [g] (/var/db2/global.reg)
- Instance node level profile registry [n] (~/sqllib/nodes/node_number.env)
- Instance profile registry (/var/db2/global.reg)
db2set ?
db2set -lr
db2set
db2set registry_variable_name
db2set registry_variable_name=
db2set registry_variable_name=new_value
db2set registry_variable_name=new_value -i instance_name
db2set registry_variable_name=new_value -g
db2set registry_variable_name=new_value -i instance_name node_number
db2set -r registry_variable_name
db2set -r registry_variable_name node_number
Priority of DB2 Env/registry variables:
- OS environment set with set/export
- Node instance
- Instance
- Global
To read global profile: db2greg -dump
Detecting DB2 products installed: /usr/local/bin/db2ls *This internally checks global.reg file
SYSIBMADM.REG_VARIABLES admin view:
select substr(REG_VAR_NAME,1,35) NAME, substr(REG_VAR_VALUE,1,35) VALUE,
LEVEL from SYSIBMADM.REG_VARIABLES
REG_LIST_VARIABLES Table function:
SELECT CHAR(REG_VAR_NAME,35) AS REGVAR, CHAR(REG_VAR_VALUE,35) AS
VALUE,LEVEL FROM TABLE(REG_LIST_VARIABLES()) AS REG ORDER BY 3,1
Customizing DB2 CLP prompt:
db2set DB2_CLPPROMPT="(Instance: %i, Database: %d):"
Setting history limit:
db2set DB2_CLP_HISTSIZE=500
2 db2 instance creation

More Related Content

What's hot

Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出锐 张
 
Strategies for Backing Up MongoDB
Strategies for Backing Up MongoDBStrategies for Backing Up MongoDB
Strategies for Backing Up MongoDBMongoDB
 
Backup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryBackup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryMongoDB
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1sdiviney
 
DSpace Installation
DSpace InstallationDSpace Installation
DSpace InstallationNur Ahammad
 
Subversion: A Getting Started Presentation
Subversion: A Getting Started PresentationSubversion: A Getting Started Presentation
Subversion: A Getting Started PresentationNap Ramirez
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installationhabeebulla g
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redisKris Jeong
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced ReplicationMongoDB
 
Archlinux install
Archlinux installArchlinux install
Archlinux installsambismo
 
DNS Server Configuration
DNS Server ConfigurationDNS Server Configuration
DNS Server Configurationchacheng oo
 
Improve your storage with bcachefs
Improve your storage with bcachefsImprove your storage with bcachefs
Improve your storage with bcachefsMarian Marinov
 
Logical volume manager xfs
Logical volume manager xfsLogical volume manager xfs
Logical volume manager xfsSarwar Javaid
 
Basic command ppt
Basic command pptBasic command ppt
Basic command pptRohit Kumar
 
Data analysis on hadoop
Data analysis on hadoopData analysis on hadoop
Data analysis on hadoopFrank Y
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHPfwso
 

What's hot (20)

Redis深入浅出
Redis深入浅出Redis深入浅出
Redis深入浅出
 
Drush
DrushDrush
Drush
 
Strategies for Backing Up MongoDB
Strategies for Backing Up MongoDBStrategies for Backing Up MongoDB
Strategies for Backing Up MongoDB
 
Backup, Restore, and Disaster Recovery
Backup, Restore, and Disaster RecoveryBackup, Restore, and Disaster Recovery
Backup, Restore, and Disaster Recovery
 
Learning Linux v2.1
Learning Linux v2.1Learning Linux v2.1
Learning Linux v2.1
 
DSpace Installation
DSpace InstallationDSpace Installation
DSpace Installation
 
Subversion: A Getting Started Presentation
Subversion: A Getting Started PresentationSubversion: A Getting Started Presentation
Subversion: A Getting Started Presentation
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redis
 
Advanced Replication
Advanced ReplicationAdvanced Replication
Advanced Replication
 
Day 2-some fun coding
Day 2-some fun codingDay 2-some fun coding
Day 2-some fun coding
 
Archlinux install
Archlinux installArchlinux install
Archlinux install
 
Basic Linux commands
Basic Linux commandsBasic Linux commands
Basic Linux commands
 
DNS Server Configuration
DNS Server ConfigurationDNS Server Configuration
DNS Server Configuration
 
Improve your storage with bcachefs
Improve your storage with bcachefsImprove your storage with bcachefs
Improve your storage with bcachefs
 
Logical volume manager xfs
Logical volume manager xfsLogical volume manager xfs
Logical volume manager xfs
 
Basic command ppt
Basic command pptBasic command ppt
Basic command ppt
 
Data analysis on hadoop
Data analysis on hadoopData analysis on hadoop
Data analysis on hadoop
 
Tablespaces
TablespacesTablespaces
Tablespaces
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHP
 

Similar to 2 db2 instance creation

Episode 2 DB2 pureScale Installation, Instance Management & Monitoring
Episode 2 DB2 pureScale Installation, Instance Management & MonitoringEpisode 2 DB2 pureScale Installation, Instance Management & Monitoring
Episode 2 DB2 pureScale Installation, Instance Management & MonitoringLaura Hood
 
Herd your chickens: Ansible for DB2 configuration management
Herd your chickens: Ansible for DB2 configuration managementHerd your chickens: Ansible for DB2 configuration management
Herd your chickens: Ansible for DB2 configuration managementFrederik Engelen
 
A DBA’s guide to using TSA
A DBA’s guide to using TSAA DBA’s guide to using TSA
A DBA’s guide to using TSAFrederik Engelen
 
S3 l3 db2 environment - instances
S3 l3   db2 environment - instancesS3 l3   db2 environment - instances
S3 l3 db2 environment - instancesMohammad Khan
 
Setup oracle golden gate 11g replication
Setup oracle golden gate 11g replicationSetup oracle golden gate 11g replication
Setup oracle golden gate 11g replicationKanwar Batra
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsMark Leith
 
DBA Basics guide
DBA Basics guideDBA Basics guide
DBA Basics guideazoznasser1
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12cuzzal basak
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...NETWAYS
 
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...Mydbops
 
NEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.ppt
NEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.pptNEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.ppt
NEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.pptMuraleedharanTV2
 
Upgrading AD from Windows Server 2003 to Windows Server 2008 R2
Upgrading AD from Windows Server 2003 to Windows Server 2008 R2Upgrading AD from Windows Server 2003 to Windows Server 2008 R2
Upgrading AD from Windows Server 2003 to Windows Server 2008 R2Amit Gatenyo
 
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...Didac Oliveira
 
Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)ÇözümPARK
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneDeepti Singh
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneDeepti Singh
 
UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70UGIF
 

Similar to 2 db2 instance creation (20)

DB2UDB_the_Basics
DB2UDB_the_BasicsDB2UDB_the_Basics
DB2UDB_the_Basics
 
Episode 2 DB2 pureScale Installation, Instance Management & Monitoring
Episode 2 DB2 pureScale Installation, Instance Management & MonitoringEpisode 2 DB2 pureScale Installation, Instance Management & Monitoring
Episode 2 DB2 pureScale Installation, Instance Management & Monitoring
 
Herd your chickens: Ansible for DB2 configuration management
Herd your chickens: Ansible for DB2 configuration managementHerd your chickens: Ansible for DB2 configuration management
Herd your chickens: Ansible for DB2 configuration management
 
A DBA’s guide to using TSA
A DBA’s guide to using TSAA DBA’s guide to using TSA
A DBA’s guide to using TSA
 
S3 l3 db2 environment - instances
S3 l3   db2 environment - instancesS3 l3   db2 environment - instances
S3 l3 db2 environment - instances
 
Setup oracle golden gate 11g replication
Setup oracle golden gate 11g replicationSetup oracle golden gate 11g replication
Setup oracle golden gate 11g replication
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
DBA Basics guide
DBA Basics guideDBA Basics guide
DBA Basics guide
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
OSMC 2019 | Use Cloud services & features in your redundant Icinga2 Environme...
 
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
Analyze corefile and backtraces with GDB for Mysql/MariaDB on Linux - Nilanda...
 
NEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.ppt
NEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.pptNEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.ppt
NEDb2UG_Db2 13 for zOS install and migration using zOSMF workflows_032223.ppt
 
Upgrading AD from Windows Server 2003 to Windows Server 2008 R2
Upgrading AD from Windows Server 2003 to Windows Server 2008 R2Upgrading AD from Windows Server 2003 to Windows Server 2008 R2
Upgrading AD from Windows Server 2003 to Windows Server 2008 R2
 
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
FOSDEM'17: Disaster Recovery Management with ReaR (relax-and-recover) & DRLM ...
 
Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)
 
Mongodb workshop
Mongodb workshopMongodb workshop
Mongodb workshop
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
MariaDB training
MariaDB trainingMariaDB training
MariaDB training
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70UGIF 12 2010 - features11.70
UGIF 12 2010 - features11.70
 

More from Ravikumar Nandigam

Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadRavikumar Nandigam
 
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadRavikumar Nandigam
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadRavikumar Nandigam
 
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...Ravikumar Nandigam
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruRavikumar Nandigam
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBARavikumar Nandigam
 
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadIBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadRavikumar Nandigam
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruRavikumar Nandigam
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruRavikumar Nandigam
 
data loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.gurudata loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.guruRavikumar Nandigam
 
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruIBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruRavikumar Nandigam
 
Netezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in IndiaNetezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in IndiaRavikumar Nandigam
 

More from Ravikumar Nandigam (14)

Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
 
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
 
Online Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in HyderabadOnline Training in Unix Linux Shell Scripting in Hyderabad
Online Training in Unix Linux Shell Scripting in Hyderabad
 
2 db2 instance creation
2 db2 instance creation2 db2 instance creation
2 db2 instance creation
 
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
 
Course content (netezza dba)
Course content (netezza dba)Course content (netezza dba)
Course content (netezza dba)
 
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadIBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
 
data loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.gurudata loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.guru
 
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruIBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
 
Netezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in IndiaNetezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in India
 

Recently uploaded

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

2 db2 instance creation

  • 1. DB2 for Linux, Unix, and Windows - Ravi
  • 2. What is a Database Manager? AGENDA! Installation pre-requisites CREATE/DROP START/STOP DBM Configuration db2set command db2 CLP history Q&A
  • 3. Logical database manager environment where we catalog databases and set configuration parameters Definition: DBM/Instance
  • 4. Instance = Database(s) + Processes/Threads
  • 5.
  • 6. Operating system: - Red Hat Enterprise Linux (RHEL) 5 Update 2.0.4 - SUSE Linux Enterprise Server (SLES) 10 Service Pack 2 - SUSE Linux Enterprise Server (SLES) 11 - Ubuntu 8.0.4.1 Installation Pre-requisites (Linux!) Disk space requirements: 500 to 1GB Memory requirements: Minimum of 512 MB of RAM Root (vs) Non-root installation Users/Groups
  • 7. Root (vs) Non-Root Installations
  • 9. Only one instance can be created under a user name db2icrt - Create Instance Syntax: Location: DB2DIR/instance directory.
  • 10. Example: db2icrt -u db2fenc1 db2inst1
  • 11. Removes a DB2 instance that was created by db2icrt. db2idrop - Drop Instance Syntax: You can only drop instances that are listed by db2ilist command Example: db2idrop db2inst1
  • 12. Lists all the instances that are created using the db2icrt command db2ilist - List Instances Syntax: $ db2ilist -h $ db2ilist db2inst1 db2inst2 Gets data from /var/db2/global.reg db2greg -dump
  • 13. Login as the DB2 instance owner db2start - Start Instance . $DB2_HOME/db2profile db2start
  • 14. Login as the DB2 instance owner db2stop - Stop Instance Make sure you have all applications disconnected (db2 list applications) $ db2stop $ db2stop force (= db2 force application all + db2stop) $ db2_kill
  • 15. $ db2 get instance $ db2 ? get dbm cfg GET DATABASE MANAGER CONFIGURATION [SHOW DETAIL] $ db2 get dbm cfg $ db2 get dbm cfg | grep NUMDB $ db2 update dbm cfg using NUMDB 10 $ db2 attach to db2inst1 $ db2 get dbm cfg show detail $ db2 reset dbm cfg DBM CONFIGURATION
  • 17. IBM DB2 profile registry command Allows for centralized control of environmental variables 4 Profile registries: - Instance level profile registry [i] (~/sqllib/profile.env) - Global level profile registry [g] (/var/db2/global.reg) - Instance node level profile registry [n] (~/sqllib/nodes/node_number.env) - Instance profile registry (/var/db2/global.reg) db2set ? db2set -lr db2set db2set registry_variable_name db2set registry_variable_name= db2set registry_variable_name=new_value db2set registry_variable_name=new_value -i instance_name db2set registry_variable_name=new_value -g db2set registry_variable_name=new_value -i instance_name node_number db2set -r registry_variable_name db2set -r registry_variable_name node_number
  • 18. Priority of DB2 Env/registry variables: - OS environment set with set/export - Node instance - Instance - Global To read global profile: db2greg -dump Detecting DB2 products installed: /usr/local/bin/db2ls *This internally checks global.reg file SYSIBMADM.REG_VARIABLES admin view: select substr(REG_VAR_NAME,1,35) NAME, substr(REG_VAR_VALUE,1,35) VALUE, LEVEL from SYSIBMADM.REG_VARIABLES REG_LIST_VARIABLES Table function: SELECT CHAR(REG_VAR_NAME,35) AS REGVAR, CHAR(REG_VAR_VALUE,35) AS VALUE,LEVEL FROM TABLE(REG_LIST_VARIABLES()) AS REG ORDER BY 3,1
  • 19. Customizing DB2 CLP prompt: db2set DB2_CLPPROMPT="(Instance: %i, Database: %d):" Setting history limit: db2set DB2_CLP_HISTSIZE=500

Editor's Notes

  1. http://www.ibm.com/developerworks/data/library/techarticle/dm-0509poon/
  2. Instance = Database(s) + Processes/Threads
  3. Instance view: A bit more detailed!
  4. Pre-requisites as of DB2 9.7!
  5. Instance IDs should not be root or have password expired.
  6. DB2DIR: DB2 installed location. You can find this using db2ls command http://www-01.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.server.doc/doc/c0050566.html The instance directory stores all information that pertains to a database instance. You cannot change the location of the instance directory once it is created. The directory contains: The database manager configuration file (db2systm) The system database directory The node directory The node configuration file (db2nodes.cfg) Any other files that contain debugging information, such as the exception or register dump or the call stack for the DB2 database processes. The installation process creates a default DB2 instance, which is defined by the DB2INSTANCE environment variable. However, instances can be created/dropped after installation.
  7. Auto starting Instances: db2iauto -on instance_name On LUW, an instance created by using db2icrt is set as a manual start.
  8. ps -ef | grep ^db2inst1 | egrep -v "bash|sshd|grep"
  9. ps -ef | grep ^db2inst1 | egrep -v "bash|sshd|grep“ reset dbm cfg: Resets the DBM configuration file to its default values Location of DBM CFG file: ./sqllib/db2systm Link: https://www.columbia.edu/sec/acis/db2/db2d0/db2d0160.htm
  10. Instance node level profile registry: For partitioned databases **** To display help information for the command, use: db2set ? To list the complete set of all supported registry variables, use: db2set -lr To list all currently defined registry variables for this session, use: db2set To show the current session value of a registry variable, use: db2set registry_variable_name To delete the current session value of a registry variable, use: db2set registry_variable_name= To change a registry variable for this session only, use: db2set registry_variable_name=new_value To change a registry variable default for all databases in the instance, use: db2set registry_variable_name=new_value -I instance_name To change a registry variable default for all instances in the system, use: db2set registry_variable_name=new_value -g Note:The two parameters "-I" and "-G" cannot be used at the same time in the same command. To change a registry variable default for a particular node in an instance, use: db2set registry_variable_name=new_value -i instance_name node_number To reset all registry variables for an instance back to the defaults found in the Global Profile Registry, use: db2set -r registry_variable_name To reset all registry variables for a node in an instance back to the defaults found in the Global Profile Registry, use: db2set -r registry_variable_name node_number ***
  11. Instance node level profile registry: For partitioned databases **** To display help information for the command, use: db2set ? To list the complete set of all supported registry variables, use: db2set -lr To list all currently defined registry variables for this session, use: db2set To show the current session value of a registry variable, use: db2set registry_variable_name To delete the current session value of a registry variable, use: db2set registry_variable_name= To change a registry variable for this session only, use: db2set registry_variable_name=new_value To change a registry variable default for all databases in the instance, use: db2set registry_variable_name=new_value -I instance_name To change a registry variable default for all instances in the system, use: db2set registry_variable_name=new_value -g Note:The two parameters "-I" and "-G" cannot be used at the same time in the same command. To change a registry variable default for a particular node in an instance, use: db2set registry_variable_name=new_value -i instance_name node_number To reset all registry variables for an instance back to the defaults found in the Global Profile Registry, use: db2set -r registry_variable_name To reset all registry variables for a node in an instance back to the defaults found in the Global Profile Registry, use: db2set -r registry_variable_name node_number ***
  12. %ia: If instance attachment exists, the authid of the current instance attachment; otherwise a null string %i: Local alias of instance %da: If database connection exists, the authid. Else, null string %d: Database aliase %n: New line character