Unable to drop a function

Hi,
I have created a function. I have full access on that function. But unable to drop it. When I issue drop function function_name. My SQLPLUS hangs and after brief wait I am getting the following error ORA-04021: timeout occurred while waiting to lock object.
How to drop the function now. I am unable to use it also.
Regards,
Subbu S.

Hi,
my function is
FUNCTION PENDING_HRS
(st_dt IN DATE, ed_dt IN DATE, out_type in varchar2, loc_type in varchar2,
hrs_type in varchar2)
RETURN NUMBER IS
CURSOR holiday_cnt (st_dt_tr_in IN DATE, ed_dt_tr_in IN DATE,loc_type_in IN VARCHAR2 ) IS
SELECT count(*) FROM bi_prod.boe_hmh_holiday where
(LOCATION = loc_type_in or 'BOTH' = loc_type_in) and
holiday_dt between st_dt_tr_in and ed_dt_tr_in and
to_number(to_char(holiday_dt,'d')) not in (1,7);
st_dt_mod DATE;
ed_dt_mod DATE;
st_dt_tr DATE;
ed_dt_tr DATE;
st_dt_wk DATE;
ed_dt_wk DATE;
no_of_wkeds NUMBER;
st_dy_filler NUMBER;
ed_dy_filler NUMBER;
no_of_wkdys NUMBER;
st_hr_filler NUMBER;
ed_hr_filler NUMBER;
nr_hrs NUMBER;
num_hdys NUMBER;
BEGIN
no_of_wkeds :=0;
st_dy_filler :=0;
ed_dy_filler :=0;
no_of_wkdys :=0;
st_hr_filler :=0;
ed_hr_filler :=0;
nr_hrs :=0;
num_hdys :=0;
st_dt_mod := BUS_DAY(st_dt,'+',loc_type,hrs_type);
ed_dt_mod := BUS_DAY(ed_dt,'-',loc_type,hrs_type);
dbms_output.put_line(to_char(st_dt_mod,'dd-Mon-yyyy hh24:mi:ss'));
dbms_output.put_line(to_char(ed_dt_mod,'dd-Mon-yyyy hh24:mi:ss'));
if ed_dt_mod > st_dt_mod then
st_dt_tr := trunc(st_dt_mod);
ed_dt_tr := trunc(ed_dt_mod);
st_dt_wk := st_dt_tr - (to_number(to_char(st_dt_tr,'d')) - 1);
ed_dt_wk := ed_dt_tr + (7 - to_number(to_char(ed_dt_tr,'d')));
dbms_output.put_line(to_char(st_dt_wk,'dd-Mon-yyyy hh24:mi:ss'));
dbms_output.put_line(to_char(ed_dt_wk,'dd-Mon-yyyy hh24:mi:ss'));
no_of_wkeds := ((ed_dt_wk - st_dt_wk + 1) / 7) * 2;
dbms_output.put_line('Weekends - ' || no_of_wkeds);
IF to_number(to_char(st_dt_tr,'d')) > 2 THEN
st_dy_filler := to_number(to_char(st_dt_tr,'d')) - 2;
ELSE
st_dy_filler := 0;
END IF;
dbms_output.put_line ('St Filler - ' || st_dy_filler);
IF to_number(to_char(ed_dt_tr,'d')) < 6 THEN
ed_dy_filler := 6 - to_number(to_char(ed_dt_tr,'d'));
ELSE
ed_dy_filler := 0;
END IF;
dbms_output.put_line ('ed Filler - ' || ed_dy_filler);
open holiday_cnt(st_dt_tr , ed_dt_tr, loc_type);
fetch holiday_cnt into num_hdys;
close holiday_cnt;
dbms_output.put_line(num_hdys);
no_of_wkdys := ed_dt_wk - st_dt_wk - no_of_wkeds - st_dy_filler - ed_dy_filler + 1 - num_hdys;
dbms_output.put_line ('Work Days - '|| no_of_wkdys);
IF to_number(to_char(st_dt_mod,'d')) > 1 AND to_number(to_char(st_dt_mod,'d')) < 7 then
if hrs_type = '8' then
IF to_number(to_char(st_dt_mod,'hh24')) >= 9 AND (to_number(to_char(st_dt_mod,'hh24')) < 17 or (to_number(to_char(st_dt_mod,'hh24')) = 17 and to_number(to_char(st_dt_mod,'mi')) = 0 )) then
st_hr_filler := round((st_dt_mod - to_date(to_char(st_dt_tr,'dd-Mon-yyyy') || ' 09:00:00' ,'dd-Mon-yyyy hh:mi:ss')) * 24, 2) ;
ELSE
if to_number(to_char(st_dt_mod,'hh24')) < 9 then
st_hr_filler := 0;
elsif to_number(to_char(st_dt_mod,'hh24')) >= 17 then
st_hr_filler := 8;
end if;
END IF;
else
st_hr_filler := round((st_dt_mod -st_dt_tr) * 24 ,2);
end if;
ELSE
st_hr_filler := 0;
END IF;
dbms_output.put_line ('St_hr_filler - '|| st_hr_filler);
IF to_number(to_char(ed_dt_mod,'d')) > 1 AND to_number(to_char(ed_dt_mod,'d')) < 7 then
if hrs_type = '8' then
IF to_number(to_char(ed_dt_mod,'hh24')) >= 9 AND (to_number(to_char(ed_dt_mod,'hh24')) < 17 or (to_number(to_char(ed_dt_mod,'hh24')) = 17 and to_number(to_char(ed_dt_mod,'mi')) = 0 )) then
ed_hr_filler := round((to_date(to_char(ed_dt_tr,'dd-Mon-yyyy') || ' 17:00:00' ,'dd-Mon-yyyy hh24:mi:ss') - ed_dt_mod) * 24 , 2) ;
ELSE
if to_number(to_char(ed_dt_mod,'hh24')) < 9 then
ed_hr_filler := 8;
elsif to_number(to_char(ed_dt_mod,'hh24')) >= 17 then
ed_hr_filler := 0;
end if;
END IF;
else
ed_hr_filler := 24 - round((ed_dt_mod - ed_dt_tr) * (24) , 2);
end if;
ELSE
ed_hr_filler := 0;
END IF;
dbms_output.put_line ('ed_hr_filler - '|| ed_hr_filler);
IF hrs_type ='24' then
nr_hrs := (no_of_wkdys * 24) - st_hr_filler - ed_hr_filler;
else
nr_hrs := (no_of_wkdys * 8) - st_hr_filler - ed_hr_filler;
end if;
if nr_hrs < 0 then
nr_hrs := 0;
end if;
if out_type ='H' then
RETURN nr_hrs ;
else
IF hrs_type ='24' then
RETURN nr_hrs / 24;
else
RETURN nr_hrs / 8;
end if;
end if;
else
RETURN 0;
end if;
END pending_hrs;
From port string I came to know its on solaris (SVR4-be-64bit-8.1.0).
My oracle instance version is 10.2.0.4.0. I have to catch hold of my DBA.
Regards,
Subbu S.

Similar Messages

  • Hi i have installed report generation tool kit but i am unable to find a function

    hi,
    I have installed report generation toolkit full version and i have few example programms in which a function named generate report get data to modify.vi been used but i am unable to find a function pallet called  Generate Report get data to modify.vi in my function list and when ever i try to RUN this example programm i get an error saying this function is not executable if i go inside that function again its showing the same error inside that function saying its not executable if any one knows about this VI pls help me
    regards
    narayan 

    hi,
    i have tried your method by going into
    resorces i have opened the VI s there its not showing any error but how
    to open same vi or call that VI  while i am programming how i can
    search those functions in my function  pallet and i have a previously
    written prog in LABVIEW 8 VERSION where he has used this functions and
    he has made some SUB VIS using those functions and some of the contents
    VI S of resorce he has put it in a folder so every time when i try to
    open this VI  it says dependncie issue it is trying to access the VI
    FROM RESORCE AS WELL HAS FROM THE FOLDER WHERE PREVIOUSLY STORED HOW TO
    SOLVE THIS PROBLE PLEASE HELP IF ANY ONE HAS SOLLUTION FOR THIS
    REGARDS
    NARAYAN

  • Unable to drop database user

    Hi All,
    I am unable to drop database user and getting the folllowing error:
    " must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables "
    I find 3 table with AQ prefix in the schema but unable to drop these table even by using "sys" user.
    Any idea how can I do that ?
    Regards,

    Hi,
    select object_name,object_type from dba_objects where owner='USERNAME' and object_name like '%AQ%';TO drop the queue table, login as the owner and
    exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'PASTE_THE_OBJECT_NAME_FROM_ABOVE',force =>TRUE);Anand

  • Unable to drop materialized view with corrupted data blocks

    Hi,
    The alert log of our database is giving this message
    Wed Jan 31 05:23:13 2007
    ORACLE Instance mesh (pid = 9) - Error 1578 encountered while recovering transaction (6, 15) on object 13355.
    Wed Jan 31 05:23:13 2007
    Errors in file /u01/app/oracle/admin/mesh/bdump/mesh_smon_4369.trc:
    ORA-01578: ORACLE data block corrupted (file # 5, block # 388260)
    ORA-01110: data file 5: '/u03/oradata/mesh/mview.dbf'
    No one is using this mview still oracle is trying to recover this transaction (6, 15).
    when i tried to drop this mview it gives me this error
    ERROR at line 1:
    ORA-01578: ORACLE data block corrupted (file # 5, block # 388260)
    ORA-01110: data file 5: '/u03/oradata/mesh/mview.dbf'
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2255
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2461
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2430
    ORA-06512: at line 1
    I have tried to fix the corrupted data blocks by using dbms_repair package, but of no use.
    I have marked this block to be skipped by using dbms_repair.skip_block but still unable to drop it.
    Please suggest what should I do?
    Thanks in advance
    Anuj

    You are lucky if only your undesirable MV is affected by theese corrupted blocks. This is an advice to do a complete-super-full-hot-cold-middle backup of ypur database and search for any disk for a "possible replace".
    God save us!

  • Unable to run OpenScript Functional Scripts from OTM

    Hi,
    I am unable to run OpenScript Functional Scripts from OTM, but the same script is running successfully on OpenScript.
    I have a script which has all my functions (say Script A) and I am calling these functions from a different script (Script B) and even this script (Script B) uses couple of Databanks.
    Added both the scripts to OTM and when I run the script (Script B) which is calling the functions on OTM, I see the below error message.
    Error Message: Child script with alias "Proceure_ To_Pay_Functions" not found. Add to the script "Proceure_To_Pay" a script asset with alias "Proceure_ To_Pay_Functions"
    But the child script (Script A) with functions is added as a script asset in OpenScript to the calling script (Script B) and this script is running fine from OpenScript.
    Can anyone please help me in resolving this issue.
    Thanks,
    Satya

    Hi Deepu,
    It worked and able to run the scripts developed in OpenScript from OTM. Thanks for your help!!
    But I see another problem where when I try to run the script from OTM, I see a window Interactive Services Detection with a Message
    "A program running on this computer is trying to display a message" "The Program might need information from you or your permission to complete a task." with Two Options
    -> View The Message
    -> Ask me Later
    When I click on View the Message, I can see my application running by script but my desktop is not visible.
    There is another window with Return to Desktop option, when I click on this I can see my Desktop.
    Can I not see both my Desktop and application running on the same screen?
    Please help!!
    Thanks,
    Satya

  • IE 10: SSRS Reports no longer allows Drop Down functionality

    IE 10 doesn't support the SSRS Report Drop Down Functionality.
    It works fine with IE 9:
    The drop down arrow functionality only works with IE9 SSRS server for folders and reports. It does not work with IE 10.
    Please advise.
    Garth Henderson - Vanguard Business Technology

    Hi Garth,
    Thanks for your posting.
    I can fully understand the inconvenience to set configure the Compatibility View settings of IE 10 on each client computer. Based on my research, you can try the Active Directory Group Policy Object (GPO) to deploy IE settings to client machines. For more
    information, please see:
    http://technet.microsoft.com/en-us/library/gg699415.aspx
    http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/76ad800d-183b-44ed-8635-3f2feec3a223/#76ad800d-183b-44ed-8635-3f2feec3a223
    I would suggest you submitting a wish at
    https://connect.microsoft.com/sql.
    Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn about and contribute to exciting projects.
    Thanks for your understanding.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Oracle Auditing on Dropping a function

    How can I audit dropping a function in Oracle?
    audit drop any procedure option didn't work.
    audit drop a procedure option doesn't exist.
    thanks in advance.

    You can try using folowing code:
    audit procedure by hr by access;
    It will enable audinting the dropping of procedure, but it will also audit creation of procedure.
    audit drop any procedure option works but I think you tried it on a user who has only
    DROP PROCEDURE privilege. AUDIT DROP ANY PROCEDURE will audit dropping a procedure
    by a user with DROP ANYPROCEDURE privilege.
    Best Regards
    Krystian Zieja / mob

  • Unable to find partner function for SPL screening

    Hi Guys
    We are trying out the SPL functionality for our Client, We are in the Preliminary stages and have just started the Intial Configuration
    The problem comes is the Document in ECC is getting blocked and is working as per functionality
    But when in come in the GTS system and check the Documents via (SPL > Display all Documents) in the overview menu, and go ahead and check the Log, it shows an error stating
    "Unable to find partner function for SPL screening"
    I have checked the configuration and The partner structure, Functions and Assignment are all done
    Can the experts help in getting a small checklist which I should do a check through in the configuration/user side, which can trigger this error message?
    Thanks
    Regards
    Carl Ray

    Hi Carl,
    Did you load the SPL List for Screening? Prior to SPL Screening, we have to create Index for SPL Screening. Please follow the following steps and then re-check the document
    SAP GTS Area Menu (/SAPSLL/MENU_LEGAL) -> Sanctioned Party List Screening -> Master Data. Perform the below steps in sequence.
    Step 1: Reset Buffer
    Step 2: Generate Comparison Terms
    Step 3: Aggregate Comparison Terms
    Step 4: Comparison terms for Business partners
    After doing the above steps, then do the following step
    SAP GTS Area Menu (/SAPSLL/MENU_LEGAL) -> Sanctioned Party List Screening -> Logistics -> Check against updated Sanctioned Party Lists -> Check Business partner addresses
    After performing the above steps, then re-check the document.
    Let me know if the above solution help or not
    Regards
    Pradeep

  • What happened with my photoshop? the layers name disappear and every drop-down function getting smaller?

    What happened with my photoshop? the layers name disappear and every drop-down function getting smaller?

    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Unable to drop spatial index

    Hi
    In my Oracle 11.2 Test database, i had accidentally deleted the base tables of a Spatial Domain index that starts with MDRT$.
    I am unable to drop or rebuild the index. I even tried dropping the schema , however the query just hangs forever for both
    SQL> drop index Geo1_ID_1 force;
    SQL> drop user geonom cascade;I checked the AWR and ASH report , those sql are not listed there .
    Please Suggest !

    hi,
    I'm grasping at straws here, but you might want to try recreating the user_sdo_geom_metadata entry. When you do, make sure there aren't any spaces in the table_name or column_name. It looks OK though from what you printed out.
    Also, you might want to consider leaving off the sdo_numtiles and sdo_maxlevel. Oracle is no longer recommending the use of hybrid indexes in almost all cases.
    regards,
    dan

  • Unable to drop nodes onto a line.

    Hello Everyone,
    I'm hoping someone can help me with this. I've got a situation where I'm unable to drop nodes onto a line. I'm having to manually connect them at each point. The Tutorial tells me that when I drag a node over a line the node in and out should highlight and at that point I can release it and it will automatically connect onto the tree. Although this did work with the trial version it is not working with my purchased version. Most likely I've dissabled the option without knowing it. Can't find the solution in any of the manuals. Thanks for any help.

    > Man, I STILL do that... then wonder where everything
    went!!
    Well, now I know you do it, I don't feel so stupid when I do it!
    . . . But isn't it great when you hit the space bar again . . . and everything comes back!
    Andy
    G5 Quad 8GB. 250, 500 GB HDs. G-Raid 1TB. FCP 5.1.1. Shake 4.1. Sony HVR Z1E   Mac OS X (10.4.7)  
    "I've taught you all I know, and still you know nothing".

  • Unable to Drop ASM Disk Group

    Hi,
    working on Oracle 11gR2, (Solaris).
    unable to drop diskgroup, need to deinstall asm setup manually insted of running with deinstall tool.
    sqlplus / as sysasm
    SQL> startup pfile='/u01/grid/oracle/product/11.2.0/asm_1/dbs/init+ASM.ora';
    ASM instance started
    Total System Global Area  283930624 bytes
    Fixed Size                  2210328 bytes
    Variable Size             256554472 bytes
    ASM Cache                  25165824 bytes
    ORA-15110: no diskgroups mounted
    SQL> alter diskgroup fra mount;
    Diskgroup altered.
    SQL> alter diskgroup data mount;
    Diskgroup altered.
    SQL> drop diskgroup FRA INCLUDING CONTENTS;
    drop diskgroup FRA INCLUDING CONTENTS
    ERROR at line 1:
    ORA-15039: diskgroup not dropped
    ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
    lsts[0]]
    SQL> DROP DISKGROUP DATA INCLUDING CONTENTS;
    DROP DISKGROUP DATA INCLUDING CONTENTS
    ERROR at line 1:
    ORA-15039: diskgroup not dropped
    ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
    lsts[0]]

    Sachin B wrote:
    Hi,
    working on Oracle 11gR2, (Solaris).
    unable to drop diskgroup, need to deinstall asm setup manually insted of running with deinstall tool.
    sqlplus / as sysasm
    SQL> startup pfile='/u01/grid/oracle/product/11.2.0/asm_1/dbs/init+ASM.ora';
    ASM instance started
    Total System Global Area  283930624 bytes
    Fixed Size                  2210328 bytes
    Variable Size             256554472 bytes
    ASM Cache                  25165824 bytes
    ORA-15110: no diskgroups mounted
    SQL> alter diskgroup fra mount;
    Diskgroup altered.
    SQL> alter diskgroup data mount;
    Diskgroup altered.
    SQL> drop diskgroup FRA INCLUDING CONTENTS;
    drop diskgroup FRA INCLUDING CONTENTS
    ERROR at line 1:
    ORA-15039: diskgroup not dropped
    ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
    lsts[0]]
    SQL> DROP DISKGROUP DATA INCLUDING CONTENTS;
    DROP DISKGROUP DATA INCLUDING CONTENTS
    ERROR at line 1:
    ORA-15039: diskgroup not dropped
    ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
    lsts[0]]
    Did you create ASM instance manually? If yes, then follow MOS DOC ID: 976075.1

  • Unable to drop view

    Hi
    I'm unable to drop a view owned by me. The system hangs when I issue 'DROP VIEW &lt;view name&gt;.
    In DBA_OBJECTS the STATUS shows 'VALID'.
    Can you help to how to drop this problem.
    Thanks & Regards
    Bhaskara

    here are few options :
    o write a query on v$lock, v$session and v$process
    or
    o select field_lists from v$sql where sql_text like '%VIEW_NAME%' and parsing_schema_id = user_id from dba_users
    this will give you some idea about the process
    or
    o take a systemstate dump
    if you know how to read systemstate dump trace file, this is prefered method.
    try the 1st option and use addr and saddr to join the tables.
    Best,
    G

  • Unable to View COI Functions

    Hi
    I am unable to view COI functions in UCWB. Usually it should be available after Function IU eliminations and Reconciliations in process view. Please let me know, if some settings needs to be change to make it available.
    The system is SEM 6.0.

    Hi Eugene
    Your answer was to the point, correct and helpfull.
    For information of folks like me.
    When I click on consolidation of investment settings, it was asking for good will data stream.
    then I went to Data Basis - > Data Streams to Generate Good Will data target and Info prov.
    Then the system allowed my to check ..COI and now...COI functions are visible..
    Thanks..Now I will assign you full points....
    Edited by: Anurag Tambe on Sep 29, 2008 7:41 PM

  • Custom field in SC with Drop-Down function..

    Hello Friends,
       I have a requirement where i have to add new custom field in SC basic data which should have Drop down list option.. If this functionality is available in SRM then the data needs to retrieve from Custom Table..
    Please give me suggestion..
    Thanks,
    John.

    Hello Mani,
       Thanks for your hints.. If I attach data element , the field would be act as F4 help ( Search Help ) but the scenario is Add custom field in SC Basic data frame as a drop-down list box which should read value from Database not as static value..
       Please help me out for this..
    Thanks,
    John.

Maybe you are looking for

  • IPod visable to explorer and updater, but not iTunes

    Just like the subject line says, I can see the iPod in explorer. The iPod Updater can also see it. But iTunes is a no go. I can browse the iPod drive and see all of the folders. It is a 4g 20 gig When I updated to 6.01, it updated the iPod the 1st ti

  • Unable to access Archived data with an ABAP Query

    I have an ABAP Query that uses Logical Database KDF (Vendor) for reporting. KDF is Archive Enabled and I can access archived document via SAP standard programs that used the KDF Logical Database. the query appears accessing the data but nothing shows

  • SBO 2005 problem in DBDataSource InsertRecord

    Hello all, My add on runs on 2004 version, but when I try it with 2005 version, it does not work. When I    oDBDataSource2.Query(oConditions1)    oDBDataSource2.InsertRecord(oDBDataSource2.Size)    oMatrix1.LoadFromDataSource()    oMatrix1.Columns.It

  • Problem Encountered in Reports-9i

    Hi all, We are using 9ias. My problem here is, i have done a report. This report is being called from a Interface form. I have some parameters (capturing in the form) which i need to pass them to the report. In 6i, we can pass them as a TEXT_PARAMETE

  • Is Shake as good for miniDV footage?

    This is also posted at creativecow: I want to take on a project that will involve various tools/effects. I'm researching Shake (now that it's $499) and it appears to be the right tool for the job. However, I've only used FCP and your knowledge will b