Grant permision to function

hi
i have create a function at sys user and i want to execute this function from an other
user.could you tell me how i can grant the
permission at the above function
thank you a lot

Hi
do: grant execute on function_name to user_role;
Hope this help you.
Roxane
null

Similar Messages

  • Grant execute any function or package

    Hi,
    Does the below command give execute priviliges on functions and packages too ?
    grant execute any procedure to <user>;
    When i give same for fucntion it gives following error,
    SQL> grant execute any function to user2;
    grant execute any function to user2
    ERROR at line 1:
    ORA-00990: missing or invalid privilege
    Thanks.

    EXECUTE ANY PROCEDURE grants permission to all procedures and all functions, whether stand alone or packaged.
    Hopefully, you're well aware of this, but the various ANY privileges, like EXECUTE ANY PROCEDURE, are exceptionally powerful. You want to be very cautious about granting those privileges because they can introduce a number of security holes.
    Justin

  • Granting Privileges on Functions

    Hi,
    I have created two functions and am using them in a SQL statement. I would like to run the statement in apps mode, however the functions have been created under another account. I get this error message when running the statement in apps mode:
    ORA-00904: "FUNC_GET_PO": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    Error at Line: 12 Column: 86
    I can run the SQL under the user account:
    SELECT cck.concatenated_segments AS "Segment" ,
    cc.code_combination_id AS "CCID",
    jeh.je_header_id AS "Header ID",
    jel.je_line_num AS "Line Number",
    NVL ( src . user_je_source_name , '**********' ) AS "Source" ,
    NVL ( cat . user_je_category_name , '**********' ) AS "Category" ,
    jel . period_name AS "Period Name" ,
    i.gl_date AS "GL Date",
    s.vendor_name AS "Vendor Name",
    s.segment1 as "Supplier No",
    eul_fin_us.func_get_po(i.invoice_id, cc.code_combination_id) "PO No",
    eul_fin_us.func_get_po_requester(i.invoice_id, cc.code_combination_id, func_get_po(i.invoice_id, cc.code_combination_id)) "PO Requester",
    i.invoice_num AS "Transaction Number",
    i.invoice_date AS "Invoice Date",
    jel . description AS "Description" ,
    jel.accounted_dr AS "Debit" ,
    jel.accounted_cr AS "Credit" ,
    NVL(jel.accounted_dr, 0) - NVL(jel.accounted_cr, 0) AS "Net Amount"
    FROM apps.gl_code_combinations cc ,
    apps.gl_code_combinations_kfv cck,
    apps.gl_je_lines jel ,
    apps.gl_je_headers jeh ,
    apps.gl_je_batches jeb ,
    apps.gl_je_categories cat ,
    apps.gl_je_sources src,
    apps.gl_import_references r,
    apps.xla_ae_lines al,
    apps.xla_ae_headers ah,
    apps.xla_events e,
    xla.xla_transaction_entities te,
    apps.ap_invoices_all i,
    apps.ap_suppliers s
    WHERE ( cc.CHART_OF_ACCOUNTS_ID = 50328
    AND jeh.LEDGER_ID IN
    (SELECT acc.ledger_id
    FROM apps.gl_access_set_ledgers acc
    WHERE acc.access_set_id = 1000
    AND jel.code_combination_id = cc.code_combination_id
    AND cck.code_combination_id = cc.code_combination_id
    AND jel.status
    || '' = 'P'
    AND ( jel.accounted_dr != 0
    OR jel.accounted_cr != 0 )
    AND jeh.je_header_id = jel.je_header_id
    AND jeh.actual_flag = 'A'
    AND 1 = 1
    AND jeh.currency_code != 'STAT'
    AND jeb.je_batch_id = jeh.je_batch_id
    AND jeb.average_journal_flag = 'N'
    AND src.je_source_name = jeh.je_source
    AND cat.je_category_name = jeh.je_category
    AND r.je_header_id(+) = jel.je_header_id
    and r.je_line_num(+) = jel.je_line_num)
    and ( :period_name = jel.period_name
    AND al.gl_sl_link_id(+) = r.gl_sl_link_id
    AND al.ae_header_id = ah.ae_header_id(+)
    AND al.application_id = ah.application_id(+)
    AND ah.application_id = e.application_id(+)
    AND ah.event_id = e.event_id(+)
    AND e.application_id = te.application_id(+)
    AND e.entity_id = te.entity_id(+)
    AND NVL(te.source_id_int_1,-99) = i.invoice_id(+)
    AND i.vendor_id = s.vendor_id(+) )
    AND ( jel.ledger_id = 2041)
    ORDER BY src.user_je_source_name ,
    cat.user_je_category_name ,
    jeb.name ,
    jeh.name ,
    cck.concatenated_segments ,
    jel.je_line_num
    Please note EUL_FIN_US is the user account, I have granted execute priviliges on both functions to user APPS but still no luck. Can anybody help?
    Thanks

    Hi,
    one of the schema prefix is missing, (in the func_get_po_requester function call), use this version:
    SELECT cck.concatenated_segments AS "Segment" ,
    cc.code_combination_id AS "CCID",
    jeh.je_header_id AS "Header ID",
    jel.je_line_num AS "Line Number",
    NVL ( src . user_je_source_name , '**********' ) AS "Source" ,
    NVL ( cat . user_je_category_name , '**********' ) AS "Category" ,
    jel . period_name AS "Period Name" ,
    i.gl_date AS "GL Date",
    s.vendor_name AS "Vendor Name",
    s.segment1 as "Supplier No",
    eul_fin_us.func_get_po(i.invoice_id, cc.code_combination_id) "PO No",
    eul_fin_us.func_get_po_requester(i.invoice_id, cc.code_combination_id, eul_fin_us.func_get_po(i.invoice_id, cc.code_combination_id)) "PO Requester",
    i.invoice_num AS "Transaction Number",
    i.invoice_date AS "Invoice Date",
    jel . description AS "Description" ,
    jel.accounted_dr AS "Debit" ,
    jel.accounted_cr AS "Credit" ,
    NVL(jel.accounted_dr, 0) - NVL(jel.accounted_cr, 0) AS "Net Amount"
    FROM apps.gl_code_combinations cc ,
    apps.gl_code_combinations_kfv cck,
    apps.gl_je_lines jel ,
    apps.gl_je_headers jeh ,
    apps.gl_je_batches jeb ,
    apps.gl_je_categories cat ,
    apps.gl_je_sources src,
    apps.gl_import_references r,
    apps.xla_ae_lines al,
    apps.xla_ae_headers ah,
    apps.xla_events e,
    xla.xla_transaction_entities te,
    apps.ap_invoices_all i,
    apps.ap_suppliers s
    WHERE ( cc.CHART_OF_ACCOUNTS_ID = 50328
    AND jeh.LEDGER_ID IN
    (SELECT acc.ledger_id
    FROM apps.gl_access_set_ledgers acc
    WHERE acc.access_set_id = 1000
    AND jel.code_combination_id = cc.code_combination_id
    AND cck.code_combination_id = cc.code_combination_id
    AND jel.status
    || '' = 'P'
    AND ( jel.accounted_dr != 0
    OR jel.accounted_cr != 0 )
    AND jeh.je_header_id = jel.je_header_id
    AND jeh.actual_flag = 'A'
    AND 1 = 1
    AND jeh.currency_code != 'STAT'
    AND jeb.je_batch_id = jeh.je_batch_id
    AND jeb.average_journal_flag = 'N'
    AND src.je_source_name = jeh.je_source
    AND cat.je_category_name = jeh.je_category
    AND r.je_header_id(+) = jel.je_header_id
    and r.je_line_num(+) = jel.je_line_num)
    and ( :period_name = jel.period_name
    AND al.gl_sl_link_id(+) = r.gl_sl_link_id
    AND al.ae_header_id = ah.ae_header_id(+)
    AND al.application_id = ah.application_id(+)
    AND ah.application_id = e.application_id(+)
    AND ah.event_id = e.event_id(+)
    AND e.application_id = te.application_id(+)
    AND e.entity_id = te.entity_id(+)
    AND NVL(te.source_id_int_1,-99) = i.invoice_id(+)
    AND i.vendor_id = s.vendor_id(+) )
    AND ( jel.ledger_id = 2041)
    ORDER BY src.user_je_source_name ,
    cat.user_je_category_name ,
    jeb.name ,
    jeh.name ,
    cck.concatenated_segments ,
    jel.je_line_numEdited by: user11268895 on Aug 20, 2010 3:53 PM

  • Grant rights to function

    hi i have create a function in sys user and
    i want to give permissions to execute this function from an other user.
    thanks a lot

    Grant Execute On Function_Name To User_Name;

  • How to give grant permission on packaged procedure

    Hi ,
    This is Ramesh  what is my requirement is i want give permission packaged procedure that means i given permission  only procedure not entire package it is possible or  not? if yes then why
    given example

    Hi,
    You  can't  give grant to package.function or procedure.
    You  can do that following way.
    SQL> create or replace package p is function f return number; end p;
      2  /
    Package created.
    SQL> create or replace function f return number is begin return p.f; end;
      2  /
    Function created.
    SQL> grant execute on f to scott;
    Grant succeeded.
    Regards
    Mahir M. Quluzade

  • Unable to create function based Index

    Hi All,
    I created a function as below:
    create or replace function eqx_oklb_term_date_nvl(pin_term_date date)
    return date
    deterministic
    is
    l_sub_date date := sysdate+1;
    l_return_value date := l_sub_date;
    begin
    l_return_value := nvl(pin_term_date, l_sub_date);
    return l_return_value;
    exception
    when others
    then
    l_return_value := l_sub_date;
    return l_return_value;
    end eqx_oklb_term_date_nvl;
    Now trying to create a function based index using below code:
    create index EQX_OKC_K_LINES_B_N4 on OKC.OKC_K_LINES_B(EQX_OKLB_TERM_DATE_NVL(DATE_TERMINATED))
    logging
    tablespace EQIXDATA
    noparallel;
    Encountered Error:
    SQL Error: ORA-00904: "EQX_OKLB_TERM_DATE_NVL": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    I can successfully query dba_objects for the function.
    Owner Object_name object_id object_type last_ddl_time status
    APPS     EQX_OKLB_TERM_DATE_NVL     11764623     FUNCTION     3/4/2013 9:44:57 PM     VALID
    I can also query the function using dual.
    select eqx_oklb_term_date_nvl(null) nvl_date from dual;
    nvl_date
    3/5/2013 9:53:59 PM
    I have given grants of the function to both schemas APPS/OKC
    grant all on eqx_oklb_term_date_nvl to okc;
    grant all on eqx_oklb_term_date_nvl to apps;
    The column date_terminated in table okc_k_lines_b is a date. I've checked that.
    Stuck here. Please help.
    Thanks in advance,
    Rahul

    Hi,
    To follow up, the below code resolved the issue:
    create index EQX_OKC_K_LINES_B_N4 on okc_k_lines_b(apps.eqx_oklb_term_date_nvl(date_terminated))
    logging
    tablespace eqixdata
    noparallel;
    -- qualifying the custom function name with schema name resolved the issue.
    Thanks,
    Rahul

  • Function based indexes on object tables

    Hi,
    I am trying to create a function based index on an object table. I am getting the following error:
    SQL> create index cell1_indx on cell1(create_cell1(id)) indextype is mdsys.spatial_index;
    create index cell1_indx on cell1(create_cell1(id)) indextype is mdsys.spatial_index
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Stmt-Execute Failure: SELECT num_rows from all_tables where owner='ASHE' and table_name=
    'CELL1'
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Here cell1 is an object table.
    Is the procedure for creating function based indexes on object tables different from relational tables?
    Chinni

    One of the many new features in Oracle 8i is the Function-Based Index (we will refrain from using FBI, but only just). This allows the DBA to create indexes on functions or expressions; these functions can be user generated pl/sql functions, standard SQL functions (non-aggregate only) or even a C callout.
    A classic problem the DBA faces in SQL Tuning is how to tune those queries that use function calls in the where clause, and result in indexes created on these columns not to be used.
    Example
    Standard B-Tree index on SURNAME with cost based optimizer
    create index non_fbi on sale_contacts (surname);
    analyze index non_fbi compute statistics;
    analyze table sale_contacts compute statistics;
    SELECT count(*) FROM sale_contacts
    WHERE UPPER(surname) = 'ELLISON';
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=3 Card=1 Bytes=17)
    1 0 SORT (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'SALES_CONTACTS' (Cost=3 Card=16 Bytes=272)
    Now we use a function based index
    create index fbi on sale_contacts (UPPER(surname));
    analyze index fbi compute statistics;
    analyze table sale_contacts compute statistics;
    SELECT count(*) FROM sale_contacts WHERE UPPER(surname) = 'ELLISON';
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=17)
    1 0 SORT (AGGREGATE)
    2 1 INDEX (RANGE SCAN) OF 'FBI' (NON-UNIQUE) (Cost=2 Card=381 Bytes=6477)
    The function-based index has forced the optimizer to use index range scans (retuning zero or more rowids) on the surname column rather than doing a full table scan (non-index lookup). Optimal performance does vary depending on table size, uniqueness and selectivity of columns, use of fast full table scans etc. Therefore try both methods to gain optimal performance in your database.
    It is important to remember that the function-based B*Tree index does not store the expression results in the index but uses an "expression tree". The optimizer performs expression matching by parsing the expression used in the SQL statement and comparing the results against the expression-tree values in the function-based index. This comparison IS case sensitive (ignores spaces) and therefore your function-based index expressions should match expressions used in the SQL statement where clauses.
    Init.ora Parameters
    The following parameter must be set in your parameter file: QUERY_REWRITE_INTEGRITY = TRUSTED
    QUERY_REWRITE_ENABLED = TRUE
    COMPATIBLE = 8.1.0.0.0 (or higher)
    Grants
    Grants To create function-based indexes the user must be granted CREATE INDEX and QUERY REWRITE, or alternatively be granted CREATE ANY INDEX and GLOBAL QUERY REWRITE. The index owner must have EXECUTE access on the function used for the index. If execute access is revoked then the function-based index will be "disabled" (see dba_indexes).
    Disabled Indexes
    If your function-based index has a status of "disabled" the DBA can do one of the following:
    a) drop and create the index (take note of its current settings)
    b) alter index enable, function-based indexes only, also use disable keyword as required
    c) alter index unusable.
    Queries on a DISABLED index fail if the optimizer chooses to use the index.Here is an example ORA error:
    ERROR at line 1: ORA-30554: function-based index MYUSER.FBI is disabled.
    All DML operations on a DISABLED index also fail unless the index is also marked UNUSABLE and the initialization parameter SKIP_UNUSABLE_INDEXES is set to true.
    Some more Examples
    CREATE INDEX expression_ndx
    ON mytable ((mycola + mycolc) * mycolb);
    SELECT mycolc FROM mytable
    WHERE (mycola + mycolc) * mycolb <= 256;
    ..or a composite index..
    CREATE INDEX example_ndx
    ON myexample (mycola, UPPER(mycolb), mycolc);
    SELECT mycolc FROM myexample
    WHERE mycola = 55 AND UPPER(mycolb) = 'JONES';
    Restriction & Rule Summary
    The following restrictions apply to function based indexes. You may not index:
    a) LOB columns
    b) REF
    c) Nested table column
    d) Objects types with any of the above data types.
    Function-based indexes must always follow these rules:
    a) Cost Based optimizer only, must generate statistics after the index is created
    b) Can not store NULL values (function can not return NULL under any circumstance)
    c) If a user defined pl/sql routine is used for the function-based index, and is invalidated, the index will become "disabled"
    d) Functions must be deterministic (always return the same value for a known input)
    e) The index owner must have "execute" access on function used in the function-based index. Revocation of the privilege will render the index "disabled"
    f) May have a B-Tree and Bitmap index type only
    g) Can not use expressions that are based on aggregate functions, ie. SUM, AVG etc.
    h) To alter a function-based index as enabled, the function used must be valid, deterministic and the signature of the function matches the signature of the function when it was created.
    Joel P�rez

  • Function based indexes doing full table scan

    Guys,
    I am testing function based indexes and whatever I do
    it is doing a full table scan.
    1)I have set the following init parameters as
    QUERY_REWRITE_ENABLED=TRUE
    QUERY_REWRITE_INTEGRITY=TRUSTED
    2)CREATE INDEX i3 ON emp(UPPER(ename));
    3) ANALYZE TABLE emp COMPUTE STATISTICS
    ANALYZE INDEX I3 COMPUTE STATISTICS
    4) DELETE plan_table;
    5) EXPLAIN PLAN SET statement_id='Test1' FOR
    SELECT ename FROM emp WHERE UPPER(ename) = 'KING';
    6) SELECT LPAD(' ',2*level-2)||operation||' '||options||' '||object_name
    query_plan
    FROM plan_table
    WHERE statement_id='Test1'
    CONNECT BY prior id = parent_id
    START WITH id = 0 order by id
    7) And the query plan shows as
    SELECT STATEMENT
    TABLE ACCESS FULL EMP
    I am using 9.0.1.4 !!!
    Any help is appreciated !!!
    Regards,
    A.Kishore

    One of the many new features in Oracle 8i is the Function-Based Index (we will refrain from using FBI, but only just). This allows the DBA to create indexes on functions or expressions; these functions can be user generated pl/sql functions, standard SQL functions (non-aggregate only) or even a C callout.
    A classic problem the DBA faces in SQL Tuning is how to tune those queries that use function calls in the where clause, and result in indexes created on these columns not to be used.
    Example
    Standard B-Tree index on SURNAME with cost based optimizer
    create index non_fbi on sale_contacts (surname);
    analyze index non_fbi compute statistics;
    analyze table sale_contacts compute statistics;
    SELECT count(*) FROM sale_contacts
    WHERE UPPER(surname) = 'ELLISON';
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=3 Card=1 Bytes=17)
    1 0 SORT (AGGREGATE)
    2 1 TABLE ACCESS (FULL) OF 'SALES_CONTACTS' (Cost=3 Card=16 Bytes=272)
    Now we use a function based index
    create index fbi on sale_contacts (UPPER(surname));
    analyze index fbi compute statistics;
    analyze table sale_contacts compute statistics;
    SELECT count(*) FROM sale_contacts WHERE UPPER(surname) = 'ELLISON';
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=2 Card=1 Bytes=17)
    1 0 SORT (AGGREGATE)
    2 1 INDEX (RANGE SCAN) OF 'FBI' (NON-UNIQUE) (Cost=2 Card=381 Bytes=6477)
    The function-based index has forced the optimizer to use index range scans (retuning zero or more rowids) on the surname column rather than doing a full table scan (non-index lookup). Optimal performance does vary depending on table size, uniqueness and selectivity of columns, use of fast full table scans etc. Therefore try both methods to gain optimal performance in your database.
    It is important to remember that the function-based B*Tree index does not store the expression results in the index but uses an "expression tree". The optimizer performs expression matching by parsing the expression used in the SQL statement and comparing the results against the expression-tree values in the function-based index. This comparison IS case sensitive (ignores spaces) and therefore your function-based index expressions should match expressions used in the SQL statement where clauses.
    Init.ora Parameters
    The following parameter must be set in your parameter file: QUERY_REWRITE_INTEGRITY = TRUSTED
    QUERY_REWRITE_ENABLED = TRUE
    COMPATIBLE = 8.1.0.0.0 (or higher)
    Grants
    Grants To create function-based indexes the user must be granted CREATE INDEX and QUERY REWRITE, or alternatively be granted CREATE ANY INDEX and GLOBAL QUERY REWRITE. The index owner must have EXECUTE access on the function used for the index. If execute access is revoked then the function-based index will be "disabled" (see dba_indexes).
    Disabled Indexes
    If your function-based index has a status of "disabled" the DBA can do one of the following:
    a) drop and create the index (take note of its current settings)
    b) alter index enable, function-based indexes only, also use disable keyword as required
    c) alter index unusable.
    Queries on a DISABLED index fail if the optimizer chooses to use the index.Here is an example ORA error:
    ERROR at line 1: ORA-30554: function-based index MYUSER.FBI is disabled.
    All DML operations on a DISABLED index also fail unless the index is also marked UNUSABLE and the initialization parameter SKIP_UNUSABLE_INDEXES is set to true.
    Some more Examples
    CREATE INDEX expression_ndx
    ON mytable ((mycola + mycolc) * mycolb);
    SELECT mycolc FROM mytable
    WHERE (mycola + mycolc) * mycolb <= 256;
    ..or a composite index..
    CREATE INDEX example_ndx
    ON myexample (mycola, UPPER(mycolb), mycolc);
    SELECT mycolc FROM myexample
    WHERE mycola = 55 AND UPPER(mycolb) = 'JONES';
    Restriction & Rule Summary
    The following restrictions apply to function based indexes. You may not index:
    a) LOB columns
    b) REF
    c) Nested table column
    d) Objects types with any of the above data types.
    Function-based indexes must always follow these rules:
    a) Cost Based optimizer only, must generate statistics after the index is created
    b) Can not store NULL values (function can not return NULL under any circumstance)
    c) If a user defined pl/sql routine is used for the function-based index, and is invalidated, the index will become "disabled"
    d) Functions must be deterministic (always return the same value for a known input)
    e) The index owner must have "execute" access on function used in the function-based index. Revocation of the privilege will render the index "disabled"
    f) May have a B-Tree and Bitmap index type only
    g) Can not use expressions that are based on aggregate functions, ie. SUM, AVG etc.
    h) To alter a function-based index as enabled, the function used must be valid, deterministic and the signature of the function matches the signature of the function when it was created.
    Joel P�rez

  • Very urgent...function wise security

    Hi all,
    -our system has function wise security on forms,which mean each user has different grant on each function(FORM)
    -those function are defined in table holds FUN_ID,Fun_Path,Fun_title
    -due to workflow difference many functions may refere to the same form but differs only in title and of course function ID(PK)
    -the main menu is a list item which fills dynamically with forms title according to user grants,and the value of this list item is FUN_ID
    -now i open the form from the main menu i pass list item value (FUN_ID) to a global then read this global from within the form
    THE PROBLEM:
    if i've to call a FORM from another form how can i set this global to the FUN_ID of the new form..i dont want to hard code this and i want to know if there is a system variable which is unique for each form???
    thanks in advance
    sinar

    I don't think there is something unique for each form but at least there is a system variable to see the current form you're in. isn't that enough.
    bye,

  • Schema permision

    hi,
    Using 10g database. Need some help on below issues
    I have created required no. Of users for individual login to sql. Now problem is that users are granted for procedure, function and packages but after login they are not able to do any amendment in function, procedure and package. Always shows insufficient privelge. If i give privledge for alter any procedure then it works but prblm is that they are able to access other schema's procedure and can do amendment also. Which should nt happen. I want particular user should access particular schema and its procedure , function etc. Other schema should not be accessable.
    Thanks

    Hi FRNzzz!! wrote:
    hi,
    Using 10g database. Need some help on below issues
    I have created required no. Of users for individual login to sql. Now problem is that users are granted for procedure, function and packages but after login they are not able to do any amendment in function, procedure and package. Always shows insufficient privelge. If i give privledge for alter any procedure then it works but prblm is that they are able to access other schema's procedure and can do amendment also. Which should nt happen. I want particular user should access particular schema and its procedure , function etc. Other schema should not be accessable.
    ThanksTry This
    For Package Level Procs/Functions
    GRANT EXECUTE on Schema_name.Package_name TO your_user;Or
    GRANT ALL on Schema_name.Package_name to your_user;Where ALL inclues->Alter,Update,Select,Delete,Execute Operations.
    By the way you can also revoke the grants from your user.
    If still your getting same error,kindly post the exact error message.
    Hope this Helps
    Regards,
    Achyut

  • Creating objects only with role grants.

    Good afternoon, everybody.
    I'm having a problem to compile some procedures in a scheme, let's call it scheme A.
    This scheme A is receiving privileges to execute a function(B.get_date) of other scheme, let's call it scheme B, through a role B_STUFF.
    When I try to compile a procedure from scheme A that uses the function B.get_date, it doesn't compile because there are
    insufficient privileges for scheme A to execute that function, but I already gave that privilege through the role B_STUFF.
    Nevertheless it only works when I give direct grant execute on function B.get_date to schema A.
    Here is the example of my problem:
    create function B.get_date return date
    is
    Begin
    return sysdate;
    end;
    grant execute on function B.get_date to B_STUFF;
    grant B_STUFF to A;
    create procedure A.proc
    is
    begin
    ....uses the function B.get_date....
    end;
    Invalid object.
    Is there a way to do this without having to give direct privilege of an object to a schema?
    Thanks for the attention...
    Regards...

    Is there a way? Yes. But it's probably not what you want...
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure a.proc
      2    authid current_user
      3  is
      4    l_dt date;
      5  begin
      6    execute immediate 'select b.get_date from dual' into l_dt;
      7    dbms_output.put_line( l_dt );
      8* end;
    SQL> /
    Procedure created.
    SQL> set serveroutput on;
    SQL> exec a.proc;
    06-FEB-13
    PL/SQL procedure successfully completed.will work. Any user that wants to execute the A.PROC procedure will need to have the ability to call B.GET_DATE (either directly or via a role).
    In general, since roles can be enabled or disabled in a session, password protected, made default or non-default, etc. you can't use them when you're creating persistent objects. Otherwise, if A has two sessions open and in one session B_STUFF is enabled and in the other the role is disabled, Oracle would have a very hard time figuring out whether the A.PROC procedure should be valid or not. And then what happens when both of those sessions are terminated-- which set of roles should Oracle then use for A's persistent objects? That's why Oracle generally depends on privileges that are granted directly to a user when you're trying to create persistent objects.
    Justin

  • Can not select from SAPTOOLS.DB6PMCF

    We use third-party tool to monitor our SAP systems. We receive an error
    Can not select from SAPTOOLS.DB6PMCF
    when we monitor DB2 database.
    Function DB6PMCF is registered in SAPSID schema. Can I register it also in SAPTOOLS schema? What is a correct procedure for this?

    Hi Milan,
    I think you have to issue the following command for the affected user.
    db2 "grant execute on function saptools.db6pmcf to <user>"
    regards, Javier Rocha

  • Problem with hardware acceleration on HBO GO

    I just got a Zotac ZBOX AD02 (AMD E-350 APU w/ Radeon HD 6310) and in general it's working great.  However, I  have a problem with Flash video on HBO GO.  For the first minute or so  of steaming video, everything seems perfect.  Video is high quality and  smooth, CPU is around 50%.  Then after a minute or two there will always  be some visible video glitch and CPU utilization will jump up to  90-100% and playback becomes extremely choppy.  So I'm guessing Flash  hardware acceleration is working initially, then something happens that  kills the hardware acceleration, and of course the E-350 CPU is not up the  task by itself.
    The really strange thing is that it seems to be specific to HBO GO.  I  can stream HD all day long from Amazon Instant Video and Youtube (at least when Youtube is able  to dish it out fast enough).  And it's definitely not a bandwidth  problem.  I have Comcast cable (20Mb down), and a bigger computer I have hooked up  to another TV  has no problem with HBO GO.  I think the same problem happens on the bigger computer, but it's faster CPU can overcome the lack of hardware acceleration.
    I've got the latest drivers from AMD and the latest Flash player (even  tried the 11 beta) and have tried all the main browsers (FF, IE, Chrome), but it's always  the same: 1-2 minutes of perfect playback and moderate CPU utilization,  then jacked up CPU and choppy playback.
    Unfortunately, there doesn't seem to be any way to contact HBO GO directly about this problem (support links just refer you to your cable provider), so I thought I'd give it a shot here. Is anyone else out there having this problem with HBO GO or any other  Flash video sites?  Any thoughts on what else I could do to track down the  root cause?

    Well, my idea with 10.x on IE didn't really work.  Results were not nearly as good as in Firefox, and I'm not willing to use 10.x in my main browser.
    However, based on your insight on the wmode=transparent issue, I started playing around with a Greasemonkey script to force wmode=direct, and I think it actually works.  I haven't been able to try it at home yet on the problem PC, but here on my work PC (don't tell anyone I'm not actually working) it makes a massive difference in CPU utilization.  Without the script CPU is around 80-90% during video playback.  When I enable the script it drops to around 20%.  The only issue is that I usually have to refresh the page once video playback starts to get wmode=direct to take effect (start video playback, then once the video playback page loads, hit refresh in the browser).
    My script is just a modified version of this one I found:
    http://userscripts.org/scripts/show/67260
    Here's my modified Greasemonkey script (hopefully the forum will allow javascript in posts):
    // ==UserScript==
    // @name           Force flash wmode direct on HBO GO
    // @namespace      http://userscripts.org/topics/3090#posts-11620
    // @description    Force flash video playback on HBO GO to use wmode direct to allow hardware acceleration
    // @include        http://www.hbogo.com/*/video*
    // @grant          none
    // ==/UserScript==
    (function ()
        nodeInserted();
    document.addEventListener("DOMNodeInserted", nodeInserted, false);
    function nodeInserted()
        for (var objs = document.getElementsByTagName("object"), i = 0, obj; obj = objs[i]; i++)
            if (obj.type == 'application/x-shockwave-flash')
                var skip = false;
                for (var params = obj.getElementsByTagName("param"), j = 0, param; param = params[j]; j++)
                    if (param.getAttribute("name") == "wmode")
                        skip = true;
                        param.setAttribute("value", "direct");
                        break;
                if(skip) continue;
                var param = document.createElement("param");
                param.setAttribute("name", "wmode");
                param.setAttribute("value", "direct");
                obj.appendChild(param);

  • Why an insert journal concurrent works for one app user and not for other?

    We have two app users. User A and User B. They have same responsibilities and grants over same functions and menus. When they run  a custom insert journal concurrent, only user A can execute it successfully.
    User B uses same parameters and data  as User A, but when User B  runs concurrent, it  always  fails
    What is the difference between this users?
    How we can check this difference?

    Hi,
    did you check user specific profile option settings as well?
    In addition, it would be helpful to have some more input
    regarding the error which is raised when user B runs the
    concurrent (concurrent log file output).
    Regards

  • Consultants not able to run T-Codes even after profiles are assigned.

    Hello Everyone!
    I'm trying to maintain authorization profiles for SAP Functional Consultants. I want it so that QM Consultant has authorization for using all QM T-Codes & can do only QM Customization, same for SD, MM and so on...
    For this I've maintained a profile for MM in SU02-added all MM related objects, and have activated it.
    But once I assign it to a user he's neither able to use the basic T-Codes like MM01-2-3 or ME21-2-3n nor able to do advanced customizations.
    Is there a catch I'm missing here?
    Any help would be appreciated.
    Thanks!
    Tejasav Kalra

    Hi,
    As you are on ECC6 I really wouldn't waste time with profiles.  I'm not sure what your profile design looks like but you'll need transaction start auths (S_TCODE) along with the auth objects.  [For those newbies out there, once upon a time S_TCODE didn't exist as a check and everything was provisioned through a limited subset of auth objects granting access to functionality areas]
    Use PFCG to achieve this as with SU24 configured you will (usually) get the right auth objects pulled through into your role when you add a menu transaction.
    While it would be best to start from fresh using a role, you could do as previously recommended and import your profile into a role and then pick up maintenance from there.  It will be messy but one step better than chopping about with profiles.

Maybe you are looking for

  • Ipod isn't being recognized by my computer

    My ipod has the icon that shows that it needs to be connected to itunes to be synchronized but once i connect it to the computer it won't recognize it. One of the reasons im thinking is because, i connected it to a new computer not the one i had orig

  • Creative Cloud Lost My Story File - Please Help

    I can not access a five-page file I created yesterday on Adobe Story. Please help - this is beyond irritating. Here are the details: I am a Creative Cloud member. Yesterday, I signed in to Adobe Story for the first time, entering after I'd signed in

  • HELP please: iphone won't open in itunes running OS X 10.5. so cannot get iTunes 11.1.3

    My iPhone 4s with 7.0.2 will no longer open in iTunes! HELP! It says that I need to upadate my iTunes to 11.1.3 but because I am running a Mac OS X 10.5.8 I cannot update my itunes. I need to be able to get into iTunes and I am not willing to get a n

  • HT2240 how do i unistall quicktime x??

    how do I unistall Quicktime x?  my new quicktime 7 pro will not install untill the X is unistalled

  • Reinstall Mavericks 10.9.5?

    MBP froze, wouldn't restart or shut down. Forced shut down with power button. after restarting, most of application icons are question marks (?) and are non functional. i can't access the app store to update my iOS from 10.9.5 to 10.10. can anyone he