I got a DB2 SQL1477N error when i query table on new primary server:sql
- [abcinst@syb02 ~]$ more sqllib/db2dump/db2diag.log
- 2013-04-10-14.39.58.388832+480 E854099E770 LEVEL: Warning
- PID : 2859 TID : 140734321649408PROC : db2sysc 0
- INSTANCE: abcinst NODE : 000 DB : ABCDB
- APPHDL : 0-98 APPID: *LOCAL.abcinst.130410063955
- AUTHID : ABCINST
- EDUID : 847 EDUNAME: db2agent (ABCDB) 0
- FUNCTION: DB2 UDB, data management, sqldSetupSQLCA, probe:3
- MESSAGE : ADM5570W Access was attempted on an unavailable object with id "4"
- in tablespace "3" for table "ABCINST.SYB_DATABASEINF". If the object
- is a table it will have to be dropped. If the object is a partition
- it will have to be detached. If the object is a non-partitioned index
- the index will have to be dropped.
Following is troubleshooting stepsapp
1.Getting tablespaceid,tableid and total pages:ide
- [abcinst@syb05 ~]$ db2 "select tableid from syscat.tables where tabname='SYB_DATABASEINF'"
- TABLEID
- -------
- 4
- [abcinst@syb05 ~]$ db2 list tablespaces show details
- Tablespace ID = 3
- Name = TBS01
- Type = Database managed space
- Contents = All permanent data. Large table space.
- State = 0x0000
- Detailed explanation:
- Normal
- Total pages = 524288
- Useable pages = 524256
- Used pages = 132128
- Free pages = 392128
- High water mark (pages) = 132128
- Page size (bytes) = 4096
- Extent size (pages) = 32
- Prefetch size (pages) = 32
- Number of containers = 1
- Minimum recovery time = 2013-04-10-08.43.35.000000
2.Running below db2dart commandfetch
- [abcinst@syb02 ~]$ db2dart abcdb /DDEL
- Action option: DDEL
- Warning: The database state is not consistent.
- Warning: Errors reported about reorg rows may be due to the inconsistent state of the database.
- Table ID or name, tablespace ID, first page, num of pages:
- (suffic page number with 'p' for pool relative)
- 4,3,0,524288
- ..............
- Table object data formatting start.
- 7 of 7 columns in the table will be dumped.
- Column numbers and datatypes of the columns dumped:
- 0 CHAR() -FIXED LENGTH CHARACTER STRING
- 1 CHAR() -FIXED LENGTH CHARACTER STRING
- 2 CHAR() -FIXED LENGTH CHARACTER STRING
- 3 REAL -SINGLE PRECISION FLOATING-POINT
- 4 REAL -SINGLE PRECISION FLOATING-POINT
- 5 REAL -SINGLE PRECISION FLOATING-POINT
- 6 REAL -SINGLE PRECISION FLOATING-POINT
- Filename used for output data file is TS3T4.DEL. If existing file, data will be appended to it.
- Formatted data being dumped ...
- Dumping Page 0 ....
- Dumping Page 1 ....
- Dumping Page 2 ....
- Dumping Page 3 ....
- Dumping Page 4 ....
- ............................
- Dumping Page 41999 ....
- Dumping Page 42000 ....
- Dumping Page 42001 ....
- Table object data formatting end.
- ______________________________________
- DB2DART Processing completed with warning(s)!
- Warning(s) detected during processing.
- ______________________________________
- Complete DB2DART report found in:
- /home/abcinst/sqllib/db2dump/DART0000/ABCDB.RPT
3.Dropped the table and re-created itspa
4.Imported the data into table againorm
- [abcinst@syb02 ~]$ db2 "import from /home/abcinst/sqllib/db2dump/DART0000/TS3T4.DEL of del insert into SYB_DATABASEINF"