Hire me on UpWork

Tuesday, February 21, 2012

How to find a table being refferenced ?

You want to know does a TABLE referenced as foreign key in any other table ? Let execute the following code and find out the real truth.

select a.owner,
       a.table_name,
       a.constraint_name,
       a.status
    from   all_constraints a
    where  a.constraint_type = 'R'
    and exists(
              select 1
              from   all_constraints
              where  constraint_name=a.r_constraint_name
              and constraint_type in ('P', 'U')
              and table_name = :OBJECT_NAME        --------name of the table from which you are not able to deleting
              AND OWNER = :OBJECT_OWNER)      -------- name of the schema user name
              ORDER BY TABLE_NAME, CONSTRAINT_NAME
 
 
Hopes this helps.... and leave you comments 

How to get year,month and date from two date ?

You are in trouble getting with year, month and date ? Don't worry, just run the following script with values and you will get that.
SELECT    TRUNC (MONTHS_BETWEEN (:END_DATE, :START_DATE) / 12)  YEARS,
  MOD (TRUNC (MONTHS_BETWEEN (:END_DATE, :START_DATE)), 12)  MONTHS,
 TO_DATE (:END_DATE)- ADD_MONTHS (:START_DATE,TRUNC (MONTHS_BETWEEN (:END_DATE, :START_DATE)) ) DAYS
FROM DUAL;
Hopes this helps..

Sunday, February 19, 2012

Oracle Forms 10g Browser Crashes

I'm able to open and compile forms in Developer Suit. However, when I try to execute a 10g form, I don't get very far. The browser that gets launched from Forms Designer throws an error and closes right away (after prompting to send error report). I tried IE7, IE8, and Firefox with the same result. 


What can i do ?
Do you want to get rid from this problem ? Just follow the following guideline.


1. Open Internet Explorer 8
2. Go to Tools, Internet Options
3. Click on the Advanced tab.
4. Scroll down into the Security section and find “Enable memory protection to help mitigate online attacks”.
5. Uncheck “Enable memory protection to help mitigate online attacks”.
6. Click Ok and Ok again.
7. Reboot your computer.

and also replace the JVM.DLL(2.2Mb) in the <Program Files>\Oracle\JInitiator 1.3.1.22\bin\hotspot folder.

You can download. JVM.DLL 

Hopes this helps.

ma as'salama