my databse db2V9fp0 AIX
i have a database with tables and nicknames in it.(ie,. federation running between 2 db2 databases). we took a backup of the database and restored (redirect) it on another server. but on the restored database there is no federation set up.but now on the restored database i am seeing the nicknames of first database listed in syscat.datapartitions,but they do not exist in syscat.tables.
when i am trying to create a table on the restored database (with the same name as a nickname on the first database) i am getting the following error
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0612N "PART0" is a duplicate name. SQLSTATE=42711.
there is no table or nickname present in sycat.tables with the same name as the table which i am trying to create . but when i did a list of syscat.datapartitions i found that the table exists with the datapartition name as PART0. this is not only for this single table but the datapartitions exists in syscat.datapartitions for all the nicknames present in the first database.
my question is how to delete the entries from syscat.datapartitions?? so that i can create a table with same name as the nicknames in the restored database.i have tried detaching the partitions using the ALTER TABLE DETACH PARTITION command but i am not successfull as the table doesnot exist in syscat.tables and its only present virtually in the syscat.datapartitions.
and moreover these tables are not rangepartitioned tables.
when you restore a fed db the nicknames should be present as before - otherwise you have data loss
check sysibm.systables and type='N' - federated is just a dbm cfg parameter and could be activated at restored db without having the connection to real tables - just drop them
hope this will help
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be
actually we dont want to set up the federation in the restored database.and i have checked
in the sysibm.systables where type = 'N' but i could not find any nicknames.yeah in my dbm cfg FEDERATED was enabled but there is no federation set up(i,e no DRDA wrapper and server were created).and we dont want to set up either.
but those nicknames are present as datapartitions in syscat.datapartitions.this is weard but i couldn't figure it out.
any way thanks for your reply..