SQL10004C An I/O error occurred while accessing the database directory. SQLSTATE=58031 — During DB2 Restore
DB2
Version – 9.5 Fixpack 3
OS
– AIX 5.3
SQL10004C
An I/O error occurred while accessing the database directory.
SQLSTATE=58031.
This
error was returned during the restoration of db backup on a new
server. As per the docs and references this can be caused by several
reasons including OS level permission, db and os level version etc..
But
quick workaround that can be tested to resolve this error while
performing a db2 restore is to try the restoration with different
database directory without using the default one with the use «dbpath on» clause of db2 restore command.
By adding «dbpath on» to the restoration command as below,
db2 "restore database CPSDB from '/data12/backup' dbpath on '/data12/cpsjun15' into cpsjun15 logtarget '/data12/cpsjun15/log' redirect"
Popular posts from this blog
Wait for unread message on broadcast channel — Blocking Sessions
What is Wait for unread message on broadcast channel wait event? Wait for unread message on broadcast channel is a wait event where source destination communication is involved and the database is waiting for a reply from remote party. Mostly this wait is seen related to data pump export (expdp) or import (impdp) operations. Although categorized in idle wait class «Wait for unread message on broadcast channel» can become the blocking session for some other sessions. Common causes for stuck sessions waiting on this wait event includes, Broken databases links, where remote database is not responding. Abnormally killed remote processes causing the sessions to wait. When a session is waiting on «Wait for unread message on broadcast channel» it can become a blocking session for dependent sessions. Most probably these sessions will be waiting on «library cache pin» or related concurrency wait events. The blocking_session column of (g)v$session view
ORA-16433: The database or pluggable database must be opened in read/write
ORA-16433 is an error returned when a database cannot be opened. This can be a result of multiple conditions including, The inconsistency of the database Physical corruption Loss of dependent files or access issues etc.. More often than not the solution is to recover from available backups, but there can be situations where backups are not available, specially on UAT or Test setups. Although not the ideal scenario, in this type of situation you might want to open the databases even with inconsistency. In Comes —> _ALLOW_RESETLOGS_CORRUPTION First, if you are in a position to use _ALLOW_RESETLOGS_CORRUPTION=TRUE, that means it has to be a critical moment, and when you come across more ora- errors while you are trying to reopen the databsae, that can be annoying. Note — _ALLOW_RESETLOGS_CORRUPTION=TRUE must only be used after Oracle support confirmation as a last resort. Also make sure to take cold backup before proceeding. Basic steps to be followed to resolve ORA 16433 after
ORA-27103 [ ] and ORA-6544 [pevm_peruws_callback-1] [27103] in Alert log
In a SPARC Solaris system (Ldom) which runs multiple database instances on 12.2.0.2, the alerts logs were flooded with ORA-27103 [ ] and ORA-6544 [pevm_peruws_callback-1] [27103] error messages. Database operations were impacted, new connection requests were starting to timeout. 2020-06-01T12:47:06.635714+05:30 Errors in file /u01/app/oracle/diag/rdbms/memdb/memdb1/trace/memdb1_dbw0_19325.trc: ORA-27103: internal error Additional information: 11818 Additional information: 9 ORA-27103: internal error SVR4 Error: 11: Resource temporarily unavailable Additional information: 7175 Additional information: 1114112 Errors in file /u01/app/oracle/diag/rdbms/memdb/memdb1/trace/memdb1_dbw0_19325.trc (incident=173114) (PDBNAME=CDB$ROOT): ORA-27103 [] [] [] [] [] [] [] [] [] [] [] [] Incident details in: /u01/app/oracle/diag/rdbms/memdb/memdb1/incident/incdir_173114/memdb1_dbw0_19325_i173114.trc 2020-06-01T12:47:06.651393+05:30 Errors in file /u01/app/
Select count(*) cnt
from fin_sap_prd_tbls.cdhdr cdhdr
Join fin_sap_prd_tbls.cdpos cdpos on (cdhdr.changenr = cdpos.changenr)
Join fin_sap_prd_tbls.ekko ekko on (ekko.lifnr = cdpos.objectid)
Join fin_sap_prd_tbls.ekpo ekpo on (ekpo.ebeln = ekko.ebeln)
where cdhdr.objectclas = 'KRED'
and cdhdr.objectid = 'vendornumber'
and cdpos.fname = 'ZTERM'
and ekpo.elikz != 'X';
Select count(*) cnt
from fin_sap_prd_tbls.cdhdr xcdhdr
Join fin_sap_prd_tbls.cdpos xcdpos on (xcdhdr.changenr = xcdpos.changenr)
/* Join fin_sap_prd_tbls.ekko xekko on (xekko.lifnr = xcdpos.objectid)*/
/* Join fin_sap_prd_tbls.ekpo xekpo on (xekpo.ebeln = xekko.ebeln)*/
where xcdhdr.objectclas = 'KRED'
and xcdhdr.objectid = 'vendornumber'
and xcdpos.fname = 'ZTERM'
/*and xekpo.elikz != 'X';*/
Select count(*) cnt
from /*fin_sap_prd_tbls.cdhdr xcdhdr
Join*/ fin_sap_prd_tbls.cdpos xcdpos /*on (xcdhdr.changenr = xcdpos.changenr)*/
Join fin_sap_prd_tbls.ekko xekko on (xekko.lifnr = xcdpos.objectid)
/* Join fin_sap_prd_tbls.ekpo xekpo on (xekpo.ebeln = xekko.ebeln)*/
where xcdhdr.objectclas = 'KRED'
and xcdhdr.objectid = 'vendornumber'
and xcdpos.fname = 'ZTERM'
/*and xekpo.elikz != 'X';*/
The data base I am using is Hive, and I get the below error when I run this code. When I run all my joins separately everything works fine and data is returned.
As a side question I also would like the ‘hdr’ table there can be multiple results I would like it to produce the most recent change. I have tried the Max() but it errors out as well.
FAILED: SemanticException [Error 10004]: Line 1:10155 Invalid table alias or column reference ‘cdpos’
asked Feb 28, 2017 at 17:10
5
I’d remove the alias names as the table names already match the alias. The engine might be confused by having objects with the same name.
SELECT count(*) cnt
FROM fin_vsap_prd_tbls.cdhdr
JOIN fin_sap_prd_tbls.cdpos on (cdhdr.changenr = cdpos.changenr)
JOIN fin_sap_prd_tbls.ekko on (ekko.lifnr = cdpos.objectid)
JOIN fin_sap_prd_tbls.ekpo on (ekpo.ebeln = ekko.ebeln)
WHERE cdhdr.objectclas = 'KRED'
and cdhdr.objectid = 'vendornumber'
and cdpos.fname = 'ZTERM'
and ekpo.elikz != 'X';
or name them differently…
SELECT count(*) cnt
FROM fin_vsap_prd_tbls.cdhdr xcdhdr
JOIN fin_sap_prd_tbls.cdpos xcdpos on (xcdhdr.changenr = xcdpos.changenr)
JOIN fin_sap_prd_tbls.ekko xekko on (xekko.lifnr = xcdpos.objectid)
JOIN fin_sap_prd_tbls.ekpo xekpo on (xekpo.ebeln = xekko.ebeln)
WHERE xcdhdr.objectclas = 'KRED'
and xcdhdr.objectid = 'vendornumber'
and xcdpos.fname = 'ZTERM'
and xekpo.elikz != 'X';
answered Feb 28, 2017 at 17:27
xQbertxQbert
34.4k2 gold badges40 silver badges61 bronze badges
8
|