Quantcast
Channel: Thinking Out Loud
Viewing all articles
Browse latest Browse all 668

Bad Coding and 12c Upgrade Will Break

$
0
0

With the introduction of CDB, many views have added column CON_ID.

DB1:(SYS@DB1):PRIMARY> select inst_id inst,sid,serial#,program,machine from gv$session where sid in ((select * from dba_blockers));
select inst_id inst,sid,serial#,program,machine from gv$session where sid in ((select * from dba_blockers))
                                                                              *
ERROR at line 1:
ORA-00913: too many values


DB1:(SYS@DB1):PRIMARY> desc dba_blockers;
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 HOLDING_SESSION                                                NUMBER
 CON_ID                                                         NUMBER

DB1:(SYS@DB1):PRIMARY> select inst_id inst,sid,serial#,program,machine from gv$session where sid in ((select HOLDING_SESSION from dba_blockers));

INST        SID    SERIAL# PROGRAM                        MACHINE
---- ---------- ---------- ------------------------------ ------------------------------
   1         30      14048 sqlplus@arrow.localdomain (TNS arrow.localdomain
   1         32      25425 sqlplus@arrow.localdomain (TNS arrow.localdomain

DB1:(SYS@DB1):PRIMARY>


Viewing all articles
Browse latest Browse all 668

Trending Articles