Before Creating new DB2 Data Base and Instance, Need to delete existing DB2 Data Base Instance.
Step 1 : Delete Existing DB2 Data Base and Instance
1. Login to db user and run below commands
$db2start
$db2 force application all
$db2 drop db SAMPLE(database name)
$db2stop force
$su - root
#cd /opt/IBM/db2/V9.7/instance/
#db2idrop Instance_Name
Step 2 : Creating New DB2 Instance and Data Base
2. Login to root user
#cd /opt/IBM/db2/V9.7/instance/
#db2icrt -p 50001 -u db2fenc1 Instance_Name (New Instance Name)
#db2icrt -p 60004 -u db2tfenc instance_Name (New Instance Name)
Output :
DBI1070I Program db2icrt completed successfully.
#su - db2user
$db2start
$db2 create db DATABASE-NAME(UATDB)
Output :
DB20000I The CREATE DATABASE command completed successfully.
Reference :
For finding instance name visit following link
No comments:
Post a Comment