Subscribe to Posts by Email

Subscriber Count

    703

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

11g RAC Interview questions available now.

Hello

Updated 11g Rac questions and answers and enabled link at Interviewquestions page.

Want to know new features in 12c, 18c, 19c, 20c ??? Follow this

http://db.geeksinsight.com/category/12c-database/

http://db.geeksinsight.com/category/18c-database/

http://db.geeksinsight.com/category/19c-database/

http://db.geeksinsight.com/category/20c-database/

click here

Thanks
Geek DBA

12c Database roadmap announced by Larry Ellison

 

WOW!!!! 12C database roadmap announced, as usual it is bringing us a big change in Oracle database architecture.

Oracle Open world started last sunday and Oracle CEO Larry Ellison announced a complete new paradigm architecture of Oracle Database with 12c, which is going to launched in calendar 2013.

From the architecture perspective, this is called multi tenant database.

Ellison's comments Sunday provided the most detailed look to date at the new edition, 12c, which is several years in the making.

"It is the first multitenant database in the world," Ellison said of the product. Separate memory and processes are allocated to each database, according to a slide he presented.

It incorporates a "fundamentally new architecture," he said. With it, customers can take "one dedicated set of memory, one set of operating system processes and then plug multiple separate private databases into that single container."

 

He also made the pitch for multitenancy as a way to ease the burden on corporate IT departments.

"Typically companies have hundreds, even thousands of separate databases," he said. "This becomes very expensive. You have to back up these thousands of databases. You have to buy hardware."

The multitenant capabilities in 12c provide "huge efficiency gains," Ellison said.

Oracle database 12c will be released in "calendar year 2013," an announcer stated prior to Ellison's keynote.

 

So basically a Separation of data dictionary as one database and other databases. Sounds something similar, Yes for me too. The way SQL Server/Sybase works , but lets wait for full details. Clock start ticking, tik, tik, tik.

 

Sources:-

Oracle CEO Ellison reveals more details about 'multitenant' 12c database

Oracle CEO Ellison reveals  most detail to date about 'multitenant' 12c

Larry 'Shared databases are crap' Ellison reveals shared Oracle

Oracle CEO Ellison Reveals Most Detail to Date About 'multitenant

-Thanks

Geek DBA

RAC: Modifying VIP in 10g

Modifying the VIP or VIP Hostname of a 10g Oracle Clusterware Node

Reference Notes:

Note 283684.1 How to Change Interconnect/Public Interface IP Subnet in a 10g Cluster

For complete srvctl syntax on 10gR1, Refer to Appendix B of the RAC Admin Guide:
http://download-west.oracle.com/docs/cd/B13789_01/rac.101/b10765/toc.htm

Changing the VIP involves modification of the nodeapps, which includes the Virtual IP address, the GSD, the Listener, and Oracle Notification Services (ONS). The VIP can be modified while the nodeapps are running, however changes will not take effect until the VIP, and hence the nodeapps, are restarted.

Depending on the version of Oracle Clusterware that you are running, other resources on a node, such as database instances and ASM instances, are dependent on the VIP, so stopping the nodeapps may cause other resources to be stopped – therefore, this change should be made during a scheduled outage.

In most cases, changing Data Centers or IP addresses within a Data Center will already incur an outage for other reasons, because changes need to be made at the operating system level, and servers may even need to be moved – so there is most likely a scheduled outage for this type of maintenence already.

Continue reading RAC: Modifying VIP in 10g

Corruption: Bad Number data? What is it? But my dbverify didn’t say anything about it.

Statement/session crashing with Few ora-07445 and a ora-600

(Publishing the statement is irrespective hence skipping)

 

ORA 600 [rworupo.2]
ORA-07445: exception encountered: core dump [__intel_new_memcpy()+382]
ORA-00600: internal error code, arguments: [kgh_heap_sizes:ds], [0x2AD2FD908088], [], [], [], [], [], [], [], [], [], []
ORA-07445: exception encountered: core dump [smboQbNxt()+103] [SIGSEGV] [ADDR:0x0] [PC:0x8F22023] [SI_KERNEL(general_protection)] []

Well our good luck chuck DBA has access to Metalink and found that similar to following the stack in our trace files too.

... intel_new_memcpy <- qersoSORowP <- qervwRowProcedure <- qeruaRowProcedure <- qerixFetchUniqueIndex <- qerjotRowProc <- qertbFetchByRowID <- qerjotRowProc <- qervwRowProcedure <- qersoFetch <- qervwFetch <- qerjotFetch <- qerjotFetch <- rwsfcd <- qeruaFetch <- qervwFetch <- qersoProcessULS <- qersoFetch ...

and this note:-

Query causes various ORA-07445 and ORA-600 errors [ID 1385197.1]

 

Apparently the db is upgraded to 11g from 10g and symptoms are matching, now we are on warpath to remove those corruptions.

But what is bad number data? How does it occur? According to my permissible knowledge

1) Numeric columns some how got chars into it?

2) Application interface accepts anything varchar into number column and inserts the same

for example: ‘1 ’, note the space after the digit.?

3) Conversion of columns :(?

4) etc reasons?

and how to resolve it?

1) First identify the rows that marked as corrupted

a) Identify the rows that are not equal to number values

select rowid from schema.table where rowid in (select rowid from schema.table where (numcolumn!=numcolumn/1);

this will list you all the rowid’s for that number column not equal to divisible/1 itself), this another way of checking your number column data.

 

alternatively you can download script from

b) Download the script (procedure) and execute in your database.

NOTE:428526.1 - Baddata Script To Check Database For Corrupt column data

 

c) Update the column with same value of the row that is marked as corrupted, but with multiply into one. (Exactly, you heard it correct, 1*1=(always)1, 2*1=2(always)

Recommendation:- Take a backup before you proceed

update schema.table set NUMCOLUMN = NUMCOLUMN * 1 where rowid in (select rowid from schema.table where ("NUMCOLUMN"!="NUMCOLUMN"/1))

Match the count of rows appeared in step a and then

commit;

d) Rerun the statement that is failing earlier, the above should fix the bad number data as of now. Remember this is something about data (type) corruption, not logical nor the physical corruption

 

-Thanks

Geek DBA

Tracing Sessions: Single SQL_ID, Single Process, New 11g Event Syntax

Happy Reading!!!

Hope you already aware of tracing sessions with different methods

11g onwards, you can trace a session (other session) with in the alter system command itself , no worries of finding pid etc etc. for example like below

SQL> alter session set events 'sql_trace {process : pid = <pid>, pname = <pname>, orapid = <orapid>} rest of event specification'

pid: v$process pid

pname: name of process

orapid: V$process spid

Reference Note:- Metalink (MOS) Doc ID 813737.1, “How To Use The New 11g Events++ Syntax For Easier SQL Tracing Of Datapump

Further you can trace single SQL ID, look below,

SQL> alter session set events ‘sql_trace [sql:abcdhehe2v9s1]’;

SQL> alter session set events ‘sql_trace [sql:abcdhehe2v9s1] off’;

I am sure this is very useful when we troubleshoot or want to trace particular Sql_id or the process ID.

Continue reading Tracing Sessions: Single SQL_ID, Single Process, New 11g Event Syntax

Quiz Post #4: Purge single sql from Shared Pool?

 

How to purge a single statement from shared pool?

Additional info. (Thanks to my friend colleague for updating about the version its possible and the event)

For 10g.

The enhanced DBMS_SHARED_POOL package with the PURGE procedure is included in the 10.2.0.4 patchset release.

10.2.0.2 and 10.2.0.3 customers can download and install RDBMS patch 5614566 to get access to these enhancements in DBMS_SHARED_POOL package.

Also with out the following the event never get enabled, hence you need to set the following event before executing purge procedure with DBMS_SHARED_POOL

alter session set events '5614566 trace name context forever';

For 11g,

No event set required.

SQL> select ADDRESS, HASH_VALUE from V$SQLAREA where SQL_ID like '7yc739202021a%';

ADDRESS                       HASH_VALUE

----------------                  ----------

000000085FAS77CF0  808728292

exec DBMS_SHARED_POOL.PURGE ('000000085FAS77CF0,808728292, 'C');

PL/SQL procedure successfully completed.

 

SQL> select ADDRESS, HASH_VALUE from V$SQLAREA where SQL_ID like '7yc739202021a%';

no rows selected

Quiz Post #3: Which background daemon writes to OCR Disk, crsd or cssd?

 

Which background daemon writes to OCR disk? or the voting disk?

CRSD? Answer No

CRSD just read the OCR to know about its resources.

Its OCSSD under the following conditions , Oracle cluster synchronization service daemon (OCSSD) is responsible for Writing to OCR registry.

a. New Node Addition /Deletion

b. New Service Addition / Deletion

c. Every 4 Hrs while taking OCR backup

d. Under node eviction to update the group / resource member ship.

e. Service status?

If anyone knows any other than the above,please update comment, will add to the list.

Performance Tuning Basics: Oracle Common Wait events

 

Just an excerpt from the Documentation/Note as a ready reference who reads this post.

Oracle Wait events can be divided into two categories , that is idle (IDLE) to wait for events and non-idle (NON-IDLE) .

1) Idle wait event represents ORACLE is waiting on some work at the time of diagnosis and optimize the database, without much attention to this part of the event.

2) non-idle wait event dedicated for ORACLE activities, waiting for those waiting for an event is the time to adjust the database needs attention and study.

In Oracle 10g and 11g to wait for the event in 1116 . By v $ event_name view to see waiting for the event.

You can check v$event_name view field structure:

SQL> desc v $ event_name;

Name is empty ? Type

-------------------------------------------------- --------------

EVENT # NUMBER

EVENT_ID NUMBER

NAME VARCHAR2 (64)

PARAMETER1 VARCHAR2 (64)

Parameter2 VARCHAR2 (64)

Parameter3 VARCHAR2 (64)

WAIT_CLASS_ID NUMBER

WAIT_CLASS # NUMBER

WAIT_CLASS VARCHAR2 (64)

Continue reading Performance Tuning Basics: Oracle Common Wait events

PROC-26: Error while accessing the physical storage, PROT-602: ,OCR/Voting Disk fail to mount, OCR corruption

Want to know new features in 12c, 18c, 19c, 20c ??? Follow this

More than 100+ features listed here : http://db.geeksinsight.com/category/12c-database/

More than 50+ features listed here: http://db.geeksinsight.com/category/18c-database/

More than 40 features listed here: http://db.geeksinsight.com/category/19c-database/

Upcoming 20c features : http://db.geeksinsight.com/category/20c-database/

 

 

 

 

 

 

 

Issue: CRSD not coming up, the other resource until CRS, (need CRS startup sequence, see here) CRSD is failing with error, Possible OCR corruption.

in $GI_HOME/log/<nodename>crsd.log

PROC-26: Error while accessing the physical storage,

Environment:-

GI Version: 11.2.0.2, RDBMS Version: 11.2.0.2 , Two Node RAC on Linux

We are not using ASMLIB, using block devices directly i.e /dev/mapper in asm_diskstring.

First lets check the environment,

Environment Checks:-

Verify OCR Diskgroup & its location

[root@racp001 bin]# ./ocrcheck
Errors in file :
ORA-27091: unable to queue I/O
ORA-15081: failed to submit an I/O operation to a disk
ORA-06512: at line 4
Continue reading PROC-26: Error while accessing the physical storage, PROT-602: ,OCR/Voting Disk fail to mount, OCR corruption

Quiz Post #2: Why you need to increase the cache size for sys.audsess$ sequence in RAC

 

Why you need to increase the cache size of sys.audsess$ sequence in RAC?

Answer:-

Background:- In oracle database every session must have an AUDSID (v$session.audsid) when the session spawns/created in database, this number is derived from a sequence called sys.audsess$ where the cache option set to 20 and noorder.

When you have an database that can provide logon storms , for example many number of users logged in first time during business start may create lot of logon storms to the database directly and these sequence value in the dictionary cache will be exhausted and it has to parse again and again another set 20 sequences cache values, which need an enqueue (SQ Lock) Enq: SQ for a long time or most of the time depend on the logon storms received.

In RAC this will become worse since the library cache/dictionary cache are global, both will have wait for this enqueue and cause dead lock or hang situation.

In order to mitigate the issue, we have to give cache clause for sequence audsess$ the bigger number especially for RAC instances (with noorder clause), say about 1000.

-Hope this helps