oracleinternals

Discover what process/query is using oracle temp tablespace.

Oracle FAQ defines temp table space as follows: Temporary tablespaces are used to manage space for database sort operations and for storing global temporary tables. For example, if you join two large tables, and Oracle cannot do the sort in memory, space will be allocated in a temporary tablespace for doing the sort o...

In an Oracle cluster will sysdate always return a consistent answer?

In an Oracle cluster (more than one machine co-operating to serve one database) will the "sysdate" function always return a consistent answer? Even if the servers' Operating System clock reports inconsistent values? ...

Discover what process/query is using the oracle SGA.

I have a query to monitor SGA (non-)utilisation: select sum(bytes)/1024/1024 " SGA Free " from v$sgastat where name='free memory'; That's great, but I need more detail about what exactly is using the space. Essentially, I'm looking for clues to tell me more precisely what might be wrong with this (rather large application). select * f...

What do the letter codes in Oracle user_contraints table's constraint_type column stand for?

select distinct constraint_type from user_constraints; C - C P R U Seems P means primary key and R means foreign key, correct? What are U and C? ...

What is the Oracle KGL SIMULATOR?

What is this thing called a KGL SIMULATOR and how can its memory utilisation be managed by application developers? The background to the question is that I'm occasionally getting errors like the following and would like to get a general understanding of what is using this heap-space? ORA-04031: unable to allocate 4032 bytes of share...

How does SCN_TO_TIMESTAMP work?

Does the SCN itself encode a timestamp or is it a lookup from some table. From an AskTom post he explains that the timestamp to +/-3seconds is stored in raw field in smon_scn_time. IS that where the function is going to get the value? If so, when is that table purged if ever? If so, what triggers that purge? If it is, does that make...

Hidden features in Oracle

I enjoyed the answers and questions about hidden features in sql server What can you tell us about Oracle? Hidden tables, inner workings of ..., secret stored procs, package that has good utils... ...

Oracle datafile autoextend question

If I have 2 datafiles attached to a tablespace, and BOTH are set to AUTOEXTEND and BOTH are set to unlimited, will Oracle know to extend both datafiles, or only extend one of them. I have read through many manuals, but none of them answer this question. As to why this is set like this, well, it's an inherited system that I am starting to...

Where are java classes stored in Oracle?

Where is the java bytecode for loaded java classes stored within an oracle database? Specifically, is there a view or table I can use to obtain the raw bytes for java class schema objects within Oracle? ...

Oracle: How are sequences implemented?

To meet some odd business requirements, I'm going to have to implement my own sequence-like counters. I'm going to make a first cut of this in the obvious way, but I would like to understand a bit more about how Oracle implements sequences. For example, can they use latches instead of locks? I've been unable to find much about this on...