Discovered using a function of package in the other schema gets 01031. 00000 - "insufficient privileges".

Nice day.  I have a package to Schema1 that contains a function.  I created a view in Schema2 that uses arrays of Schema1 and function of this package of Schema1 - it works very well.  I created a schema3 view that uses only the display in Schema2.  When I try to compile, I get 01031. 00000 - "insufficient privileges".  When I try to run the query from the view as the user schema3 schema3, I get the data very well.  Anyone know how I can fix this, please?

Note: If I delete the use of Schema1.sag_online_action.get_compcode (sag.sagseqnum), everything works fine.

TIA.

Schema1 Package:

function get_compcode (p_iSagseqnum in number) return varchar2 AS

VARCHAR2 (3) l_cCompcode: = ";

BEGIN

Select DECODE ('Y', sag.add_metal, "[1]",

SAG.add_gc, "[2]."

SAG.add_acid, "[3]."

SAG.add_hplc, "[4]."

SAG.add_icpms, "[5]."

SAG.add_other, '[6]' ") 'compcode.

in l_cCompcode

SAG

where sagseqnum = p_iSagseqnum;

Return l_cCompcode;

END get_compcode;

View Schema2:

CREATE OR REPLACE FORCE VIEW 'Schema2. "' OSAG_MICROBIALS ' ('id', 'micro-organisms', 'fees', 'addl_fee', 'icons', 'method', 'notes', 'technical', 'colMedium', 'shelf life', 'airVol', 'samplingRate', 'LD', 'orderNum', 'updated', 'online_update_action')

AS

SELECT sag.sagseqnum 'id,'

trim (sag.substance |) » '|| Schema1.sag_online_action.get_compcode (SAG.sagseqnum)) "microorganisms"

'Fresh,' Decode(SAG.subcontracted_flag,'Y','',SAG.fee_per_sample)

Decode(SAG.subcontracted_flag,'Y','',additional_analyte_fee) "addl_fee"

sag_symbols_key (sag.sagseqnum, sag_parameter.parmname, sag_parameter.prod) "icons."

MethodDef.MethodDesc 'method ',.

SAG.method_notes "notes."

"Technical," SAG.technique

SAG. Medium "colMedium."

sag_shelf_life (SAG.sagseqnum) "shelf life."

SAG.air_vol "airVol"

SAG.sampling_rate 'samplingRate ',.

Decode(SAG.subcontracted_flag,'Y','',sag_parameter.) LoQ) "LD",

"OrderNum, SAG.orderby_seq

(sag.osag_updated - to_date('01/01/1970','MM/DD/RRRR')) * 86400 "updated."

SAG.online_update_action "online_update_action".

SAG.

sag_parameter,

MethodDef

WHERE sag.sagseqnum = sag_parameter.sagseqnum

AND sag.methodref = methoddef.methodref (+)

AND DECODE(sag.activeflag,,'N',sag.activeflag) = 'Y '.

AND DECODE(sag.internalflag,,'Y',sag.internalflag) = n

AND DECODE (sag.technique, NULL, 'XXX', sag.technique) = "microscopy".

ORDER BY sag.substance,

SAG. Medium;

Schema3 notice:

CREATE OR REPLACE VIEW "schema3. "' OSAG_MICROBIALS ' ('id', 'micro-organisms', 'fees', 'addl_fee', 'icons', 'method', 'notes', 'technical', 'colMedium', 'shelf life', 'airVol', 'samplingRate', 'LD', 'orderNum', 'updated', 'online_update_action')

AS

SELECT "id."

"microorganisms"

"charges."

"addl_fee,"

"icons."

'method ',.

"notes."

"technique."

"colMedium,"

"shelf life."

"airVol,"

'samplingRate ',.

"LD",

"orderNum."

"to date,"

'online_update_action '.

OF Schema2.osag_microbials;

Try

Grant execute on sag_online_action to schema2 with grant option

Tags: Database

Similar Questions

  • I got a refurbished PC includes a CD of Windows XP SP3, I want to use it to install windows in the other computer and I need the product key.

    I got a refurbished pc includes a CD of windows XP SP3, I want to use it to install windows in the other computer and I need the product key.

    SP3 for xp is not the operating system, only of SP3.

    To buy a cd of xp, with key retail product #.

    Without this, you cannot install xp.

  • Reference to the other schema

    Hello

    I want to model the following situation in SQLD DM:
    -Diagram 2
    -1 schema, I define a view
    -of the other schema I want to refer to this point of view in a view

    Issues related to the:
    -Create each drawing as a drawing or a relational model in a drawing?
    -How can I refer to the other schema view in the query designer?

    SQLD DM version 3.3.0.734

    Thanks in advance,

    Joop

    Hi Joop,

    Create each drawing as a drawing or a relational model in a drawing?

    As a relationship in a drawing model.

    How can I refer to the other schema view in the query designer

    You have a set a display scheme that you create. If the objects used in the view definition belong to another scheme they are included with the schema name in a generated select statement. By default the objects in the same schema (such as the view) are not prefixed with schema name - if you want that the schema name to include, then check the box 'Schema to include in the query name' on the view dialog box.

    Philippe

  • Data type of the other schema reference

    Hello

    I want to reference the data type on the other schema, inv.customer, 1st schema table, 2nd table tran.order.

    then, when I declare my package.


    Procedure p_insertOrder
    (
    p_empid in customer.customerid%type
    p_orderid in tran.order.orderid%type
    );


    However, it gives me this error message

    PLS-00201: identifier 'tran.orde' must be declared.

    the following package is located in inv schema. so when I make reference to the customer table, I do not have the diagram for it.

    So what is the cause of this?



    ~ vincent.

    what grants do you have enabled on the table?

    Log in as tran or a dba and try:

    grant select on tran.order to inv;
    

    You can also create a public synonym so you don't have to precede the table with the schema name. Beware of the tables of the same name in your current schema if you do it well.

  • I have only 2 computers, a desktop computer and a laptop computer. Yet, every time I switch from one to the other, I get a message that I am already connected to TWO. It's impossible because I only have 2 and it is not connected. Any suggestions on fixing

    I have only 2 computers, a desktop computer and a laptop computer. Yet, every time I switch from one to the other, I get a message that I am already connected to TWO. It's impossible because I only have 2 and it is not connected. Any suggestions on fixing that?

    Hi Kelly,

    Maximum machines, the license can be activated is 2. Somehow, it seems that on your side the same license can be activated on any 3rd machine as well.

    Activating the license on any other machine, please select the option to disconnect all other devices and try again.

    Reference: connect and disconnect activate Cloud Creative applications (deactivated)

    Kind regards

    Sheena

  • ReadOnly user can access the other schema and change them

    Hello everyone,

    I created a readonly as this user in oracle 11g r2

    SQL > CREATE USER IDENTIFIED BY readonly readonly;
    SQL > GRANT CREATE SESSION, CREATE a SYNONYM to readonly.
    SQL > GRANT SELECT ON SA.vCustomerService TO readonly.

    But when I connect to the database and do a select like:
    SQL > SELECT * FROM ACC;
    I get the data in this table, even if I do an update on that table it works.

    What I am doing wrong that my readonly user always has full access to the other schema?

    Thank you in advance for your help!

    Best regards
    GIL GOMES Dany

    Dan_lu wrote:
    Hello everyone,

    I created a readonly as this user in oracle 11g r2

    SQL > CREATE USER IDENTIFIED BY readonly readonly;
    SQL > GRANT CREATE SESSION, CREATE a SYNONYM to readonly.
    SQL > GRANT SELECT ON SA.vCustomerService TO readonly.

    But when I connect to the database and do a select like:
    SQL > SELECT * FROM ACC;
    I get the data in this table, even if I do an update on that table it works.

    Check the permissions for this table - maybe some operations on this table are granted to the publc?

  • Why not two MAF project Java classes in the same package, see the other (including those in the project downloadable tutorial used)?

    I use JDev 12.1.3.0, updated to include the MAF 2.1.1 and am using 1.8.0_45 and 1.7.0_79 of JDK.

    I have the SDK with Tools 24.1.2, tools 22, Build-tools 22.0.1 platform and from the 21 API, but I don't think I even got that far...

    So, for some reason, then the creation of two public classes in the same package, they do seem to see each other.

    The flags of the code editor, any mention of each and the other classes as "< < WhateverClass > > Type not found", even after an explicit import.

    A screenshot showing the error is included.

    The classes are created by simply clicking on the ViewController project, then 'new' then selecting class Java and accepting all the default values.

    Everything I do is add a class EMP member to EMP, both in the mycomp.mobile package.

    This happens even if I don't use the prefix of the tutorial "mycomp" from the appointment package.

    At first, I noticed that when following the tutorial staff then again when downloading the employees project completed, which also shows the same problem when I open it.

    When I create any other application, same and asks the ADF, this does not happen.

    I thought that maybe it's something to do with the fact that the MAF uses JDK 8 while JDev runs on JDK 7?

    Anything I'm doing wrong?

    Any help is appreciated!

    I can't reproduce this behavior in my environment, there might be something specific to your installation.

    Can you try deleting the IDE system directory and restart JDeveloper? to find the location of this directory see help-> about-> properties-> de.system.dir

  • call function of package in the view object

    OK, I have a viewobject with a select statement on a table.
    I would like to call to a function of package, in where clause

    How can I do this?

    You're welcome :-)

    Please check the answer of the question, it might help others too, then.

    Timo

  • using a computer to attach to the other

    can I use my computer to find out what's wrong with another and how that I do

    Yes, you can; If the other machine is still running.

    If the other computer is dead, no..

    It is called Remote Assistance.

    http://windowshelp.Microsoft.com/Windows/en-us/help/398b5eda-aa7f-4078-94c5-1519b697bfa01033.mspx#en

      What is Windows Remote Assistance?
     

    When you encounter a computer problem, you sometimes can help someone else. You can use Windows Remote Assistance to invite someone to connect to your computer and help you, even if that person isn't nearby. (Make sure you only ask someone that you trust, because the other person will have access to your files and personal information.) Once connected, the other person can view your computer screen and chat with you everything you see. With your permission, your helper can use his mouse and keyboard to control your computer and show you how to solve a problem. You can also help someone else the same way.

    Mick Murphy - Microsoft partner

  • mapping to deploy: PACKAGE ORA 06550 BODY... 101031: insufficient privileges

    Hi all

    I use OWB11.2,
    When I deploy a mapping very simply.
    I met the following error
    BODY of PACKAGE ORA 06550 line 15 column 13: PL/SQL: 101031: insufficient privileges
    ORA-06550 PACKAGE BODY line 11, column 2: PL/SQL: SQL statement ignored

    I have the privilege of "select" grant from the target schema source
    I add the target owb schema group of users and 'security', I check all the privllege of target schema

    don't know what a privilege on the other do I need to add to the target schema.

    Thank you for you attention.

    Hello

    If your error statement is

    Of
    'SCHEMA_SOURCE '. ' ' TABLE_NAME_SOURCE ' 'ALIAS '.

    then, you need a direct subsidy on the subject "TABLE_NAME_SOURCE" of "SCHEMA_SOURCE"-to user (owner of package) of the target. "»

    SELECT GRANT / * ALL * / ON 'SCHEMA_SOURCE '. "' TABLE_NAME_SOURCE ' to package_owner.

    Best regards
    IM

    Published by: user9014055 on 21.02.2012 06:26

  • The sys user can not see tables belonging to the other schema

    Hello

    We have a database used to store the metadata of the soa suite, yesterday, we asked to grant select on certain tables of the prodsoa_bam schema, but we found this sys cannot see the tables of prodsoa_bam.

    If we question dba_tables we can list the tables of prodsoa_bam, but if we execute a query on the tables that we get an ORA-00942 error.

    Someone suggested a work around?

    Kind regards.

    try using double quotes. It seems that your table name is case-sensitive (which I do like):

    SELECT COUNT (*) FROM PRODSOA_ORABAM. SysIterPrivilege ';

  • Activities of track on the other schema

    I have a scheme (used by our application) accessible by many developers with this schema password.

    I want to create new patterns for each developer and also trace their changes to the schema of the application.

    Is it possible to audit changes made by each user on the application schema?

    You can use the audit

    http://docs.Oracle.com/CD/E11882_01/network.112/e16543/auditing.htm#DBSEG006
    http://docs.Oracle.com/CD/E11882_01/server.112/e26088/statements_4007.htm#SQLRF01107

  • How to use a function switch box to the reference that is used several times in the previous drop-down list options?

    I use JavaScript coding in LiveCycle and development of dependent drop-down areas, but I find it difficult to write correct code. See the example below. I'm trying to use a multiple box function that refers to an option that is listed several times in the previous pull-down menu. The problem I am running into is that when I refer to any color or Nissan and Chevy, it returns the results of the color in the "Ford" column only. I'll always see color (blue, black, green and purple) options in my second drop-down list and it seems fine, but then the third drop reference only the options and colors 'Ford '. (I don't have the code for the third menu list drop-down).

    I want the client to choose Chevy or Nissan and have her drop downs (based on the color they chose)-dependent, but I can't seem to make this work.

    I hope it is clear enough (probably as mud...). I would appreciate help!

    Form1. #subform [0]. #subform [1]. cboModels::exit - (JavaScript, client)

    cboColor.clearItems ();

    {Switch (this.) RawValue)}

    case "Ford":

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    case 'Chevy ':

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    case "Nissan":

    cboColor.addItem ("Blue");

    cboColor.addItem ("Black");

    cboColor.addItem ("Green");

    cboColor.addItem ("Purple");

    break;

    }

    Form1. #subform [0]. #subform [1]. cboColor::exit - (JavaScript, client)

    cboPrice.clearItems ();

    {Switch (this.) RawValue)}

    case "Ford":

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    case 'Chevy ':

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    case "Nissan":

    case "green":

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    cboPrice.addItem ("blah");

    break;

    }

    You can use '\n' for newline in a string, so

    "Option 1, \nOption 2, \nOption 3;

    Put each on its own line.

    Bruce

  • Gadgets Windows 7 is still not safe to use? (even those packaged with the original version)?

    A colleague sent me the following links concerning Windows gadgets in Windows 7.

    http://Windows.Microsoft.com/en-us/Windows/Gadgets

    http://go.Microsoft.com/fwlink/?LinkId=309853

    I have Windows 7 and the CPU meter that comes standard on a build of Windows 7 Enterprise.  Is still this gadget that a safety risk and I need to turn off the gadgets Windows no matter if they have been with the original or additional content downloaded version?

    I thought that if even the prepackaged gadgets where a security risk can be up-to-date critical Windows Update was released to ensure that gadgets have been disabled.

    GB

    As far as I know no (other than the Task Manager) CPU meter comes with all versions of win 7.

    How gadgets work are a risk.

  • Can I use product Recovery DVD-ROM from the other unit for my Tecra A2?

    My A2 Tectra is so damaged that I want to back to whn he bought. I can't find the DVD_ROM of recovery of product that comes with it. But I got the Toshiba A60 product DVD_ROM recovery.
    They are all the same or do I have the exact DVD_ROM to A2 TECTRA?

    Hello

    The answer is no. each recovery image is created separately, and contains drivers for specific hardware infrastructure. Best way is to use the facilities of Microsoft CD and install all the drivers, tools and utilities only later. All these things you can find on the download page of Toshiba.

Maybe you are looking for