Thursday, March 17, 2011

MMC could not create the Snap-In -IIS

If you get the following error while opening IIS,

MMC could not create the Snap-In




From the Command Line run, to resolve the issue
regsvr32 %windir%\system32\inetsrv\inetmgr.dll”

This command line basically registers the IIS Server DLL

Friday, September 10, 2010

Signature has been changed Error

ORA-04062 (Signature has been changed)

This error is cause when you have a master Schema & local schema, And the package Spec is not in sync with both the schema.

Solution:
  Compile the package one more time in both the schema.

Friday, September 3, 2010

Explain Plan

To Explain Plan
EXPLAIN PLAN FOR <Any Statement>

Eg:
EXPLAIN PLAN FOR
SELECT * FROM Emp

You can see the plan by selecting the PLAN_TABLE

SELECT * FROM PLAN_TABLE;

Or you can also use
SELECT lpad(' ',level-1)||operation||' '||options||' '||
        object_name "Plan"
   FROM plan_table
CONNECT BY prior id = parent_id
        AND prior statement_id = statement_id
  START WITH id = 0 AND statement_id = '&1'
  ORDER BY id;


You can also assign a name for the statement by
 
EXPLAIN PLAN SET statement_id = <statement Name> FOR <Statement>;

Example
EXPLAIN PLAN SET statement_id = 'example_plan1' FOR
SELECT full_name FROM per_all_people_f
 WHERE UPPER(full_name) LIKE 'Pe%' ;

Monday, August 30, 2010

What IS the cost of a query and what does it mean?

The formula for the cost (using the CPU Costing Model) of a query is:

Cost = (
#SRds * sreadtime
+ #MRds * mreadtime
+ #CPUCycles / cpuspeed
) / sreadtime

where:
#SRds = number of single block reads
#MRds = number of multi block reads
#CPUCycles = number of CPU Cycles

sreadtim = single block read time
mreadtime = multi block read time
cpuspeed = Standard 'Oracle' CPU cycles per second

The translation of this formula is:

The cost is the time spent on single block reads, plus the time spent on multiblock reads, plus the CPU time required, all divided by the time is takes to do a single block read.

This means that the cost of a query is the PREDICTED EXECUTION TIME, counted in number of single block read times and is effectively the unit of measure of the cost.

Monday, August 23, 2010

How do you find the invalid objects in your schema?

SELECT   object_name,
         object_type,
         created,
         last_ddl_time,
         status
  FROM   user_objects
 WHERE   status != 'VALID'

Saturday, July 10, 2010

How do you open a Popup from Oracle Forms



Using   web.javascript_eval_expr Statement

Example
                  web.javascript_eval_expr('window.showModelessDialog("help/SomeFile.html", "''", "dialogLeft:120px; dialogTop:260px; dialogWidth:800px; dialogHeight:455px; scroll-y:on; resizable:yes; status:no; help:no;");');
                  web.javascript_eval_expr('window.showModalDialog("help/SomeFile.html", "''", "dialogLeft:120px; dialogTop:260px; dialogWidth:800px; dialogHeight:455px; scroll-y:on; resizable:yes; status:no; help:no;");');             
                  web.javascript_eval_expr('window.open("help/SomeFile.html", "WinHelp", "location=no,menubar=no,left=220,top=260,width=800,height=455,toolbar=no,resizable=yes,scrollbars=yes");');

Friday, July 2, 2010

RETURN Statement

   
   Can we use RETURN statement in Procedure?
     Yes
     
   Check out the Below Sample
   create or replace procedure p is
    begin  
      dbms_output.put_line('one');
      return;
      dbms_output.put_line('two');
   end;
   
   exec p;
   
   Would Return
   
   one