Quote:
Originally Posted by Marcus_A
Once you uncatalog the db, it is removed from the local db directory.
|
It will be removed from the system db directory, but it will remain in the local db directory.
Example:
db2inst2@pepperjack:~> db2 create db marcus
DB20000I The CREATE DATABASE command completed successfully.
db2inst2@pepperjack:~> db2 list db directory
System Database Directory
Number of entries in the directory = 3
Database 1 entry:
Database alias = MARCUS
Database name = MARCUS
Local database directory = /home/db2inst2
Database release level = b.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
db2inst2@pepperjack:~> db2 list db directory on /home/db2inst2
Local Database Directory on /home/db2inst2
Number of entries in the directory = 2
Database 1 entry:
Database alias = MARCUS
Database name = MARCUS
Database directory = SQL00002
Database release level = b.00
Comment =
Directory entry type = Home
Catalog database partition number = 0
Database partition number = 0
db2inst2@pepperjack:~/db2inst2/NODE0000/sqldbdir> pwd
/home/db2inst2/db2inst2/NODE0000/sqldbdir
db2inst2@pepperjack:~/db2inst2/NODE0000/sqldbdir> strings /home/db2inst2/db2inst2/NODE0000/sqldbdir/sqldbdir
DB2 DIRECTORY
MARCUS
MARCUS
2SQL00002
/home/db2inst2/db2inst2
db2inst2@pepperjack:~/db2inst2/NODE0000/sqldbdir> db2 uncatalog db marcus
DB20000I The UNCATALOG DATABASE command completed successfully.
DB21056W Directory changes may not be effective until the directory cache is refreshed.
db2inst2@pepperjack:~/db2inst2/NODE0000/sqldbdir> db2 list db directory on /home/db2inst2
Local Database Directory on /home/db2inst2
Number of entries in the directory = 2
Database 1 entry:
Database alias = MARCUS
Database name = MARCUS
Database directory = SQL00002
Database release level = b.00
Comment =
Directory entry type = Home
Catalog database partition number = 0
Database partition number = 0
db2inst2@pepperjack:~/db2inst2/NODE0000/sqldbdir> strings /home/db2inst2/db2inst2/NODE0000/sqldbdir/sqldbdir
DB2 DIRECTORY
MARCUS
MARCUS
2SQL00002
/home/db2inst2/db2inst2