OBIEE and dynamic URL 

Filed under: OBIEE on Monday, June 29th, 2009 by orapunk | No Comments

oracle-bi-ee-101332-url-parameters

promptness_please.html

Nologging inserts generates no redo: WRONG!!!!!!!!! 

Filed under: Uncategorized on Thursday, April 23rd, 2009 by orapunk | No Comments

In most case NOLOGGING generetaes no redo; true. But by adding a foreign key constraint to the table it disables direct mode inserts and resorts to conventional mode logging.

The direct load is also disabled for index organized table.

How does one blackout events and jobs during maintenance slots? 

Filed under: Uncategorized on Wednesday, March 18th, 2009 by orapunk | No Comments

Managemnet and data collection activity can be suspended by imposing a blackout. See here some examples:

agentctl start blackout # Blackout the entrire agent
agentctl stop blackout # Resume monitoring and management
agentctl start blackout ORCL # Blackout DB ORCL
agentctl stop blackout ORCL # Resume monitoring DB ORCL
agentctl start blackout -s jobs -d 00:20 # Blackout jobs for 20 min

Select ‘X’ faster then Select 1 

Filed under: Oracle 10g on Friday, January 23rd, 2009 by orapunk | No Comments

What somebody at Oracle Belgium told me once 10 years ago, I retested it on Oracle 10R2.
A Select ‘X’ is faster then a Select 1.
Stop dreaming because it’s only slightly faster.
see here the tests I did

SET time ON
SET timing ON
 
declare
 v_n number;
 v_c varchar2(1);
begin
FOR i IN 1..1000000 loop
 SELECT 'X' INTO v_c FROM dual;
end loop;
end;
/
 
declare
 v_n number;
 v_c varchar2(1);
begin
FOR i IN 1..1000000 loop
 SELECT 1 INTO v_n FROM dual;
end loop;
end;
/

And see here the results:
TRY    SELECT ‘X’       SELECT 1
___    __________     _________
1          27s00             27s03
2          27s00             27s02
3          26s09             27s02
4          27s00             27s03
5          27s00             27s04
6          53s08             55s00    (case 6 is with 2M itterations)

direct path write temp 

Filed under: Oracle 10g on Tuesday, December 23rd, 2008 by orapunk | No Comments

Had a query which took ages. After checking the session browser I noticed the query was doing a lot of “direct path write temp”. So I checked directly the sort_area_size. Big surprise it had a value of 64K!!!
After sending a mail to the DBA’s of my current project to ask to increase to 1GB, everything went smooth.

Purge USER_TAB_MODIFICATIONS 

Filed under: Uncategorized on Thursday, October 30th, 2008 by orapunk | No Comments

If you want to get rid of the content of USER_TAB_MODIFICATIONS or DBA_TAB_MODIFICATIONS then you have to execute dbms_stats.FLUSH_DATABASE_MONITORING_INFO

If that is taking a very long time then you might have hit the oracle bug 5709414

How to list the installed patches on Oracle? 

Filed under: Oracle 10g, Oracle 11g, Oracle 9i on Tuesday, October 21st, 2008 by orapunk | No Comments

Use Opatch.
Look in the Opatch directory in Oracle Home.

‘opatch query -all’ will allow you to query detailed information about a patch.
‘opatch lsinventory’ will list all patches with the applied date chronologically.
‘opatch lsinventory -detail’ will list all patches and which files were modified.

Sql*plus doesn’t commit at end or does it?!? 

Filed under: Scripts, Sql*Plus on Tuesday, July 29th, 2008 by orapunk | No Comments

A collegue of mine had to debug all his code, twice, to try to find why one of his tables wasn’t populated.
Here is why: He asked to execute a script (script didn’t contained a commit statement) in sql*plus at someone of the production team. That guy opened sql*plus, executed the script and closed window (File>Exit) through the menu.

Now if you close sql*plus by using the menu or the X icon on the top right of your window, sql*plus DOES NOT commit when quiting. When you type at the prompt: “exit” or “quit” then you commit and exit sql*plus.

Just keep that in mind and btw the option “autocommit” has noting to to with this problem (on a lot of blogs and forums they thing autocommit will autocommit on exit, NOT!)