The packaged procedures, subsidies and reports

My custom label warning: I'm a newbie, forced to be a generator of queries of database by need, please bear with my horrible explanations. I searched Google this until the end of google and can not find an answer to my particular problem, if I was able to solve many questions to get here - so, I'll try.

Now, I have determined that a NOTICE that I had written for purposes of end-user reports using crystals, our 11 g database, wasn't going to work. I needed to integrate date parameters IN the body of the view/query. So I thought I'd build myself a packaged procedure.

This works. It gives me the data I want (when I am logged in as owner of the schema).

HOWEVER - I now understand that the procedures work as seen in that, if I have specific tables selected, in the procedure, users who run it must have separate SELECT privileges on each table referenced in the procedure? I don't have to do it, with a view, aren't I right? If I build a view and a PUBLIC SYNONYM for this point of view, and grant SELECT to the role that users have, they can see the data.

And to continue that - I - I also understood I must grant EXECUTE on each individual USER privileges and cannot accomplish role, with a packaged procedure?

Thank you!

Hello

EM says:
Now, I have determined that a NOTICE that I had written for purposes of end-user reports using crystals, our 11 g database, wasn't going to work. I needed to integrate date parameters IN the body of the view/query.

I don't know what you mean by 'embed' date settings.
There are ways to have a view depend of parameters, such as the view does not have to be recompiled when the parameters change. I wouldn't say that the settings are included in the view. In addition, different sessions can use the display at the same time, each (potentially) with its own parameters.
One way to store the parameters so that the view can refer to them is a global temporary Table.
(Variables SYS_CONTEXT is another, but for the DATE parameters, I think a global temporary table would be easier).

So I thought I'd build myself a packaged procedure.

This works. It gives me the data I want (when I am logged in as owner of the schema).

HOWEVER - I now understand that the procedures work as seen in that, if I have specific tables selected, in the procedure, users who run it must have separate SELECT privileges on each table referenced in the procedure?

There are 2 types of procedures: AUTHID DEFINE and AUTHID CURRENT_USER.
AUTHID DEFINE is the default value. When the tracks of the procedure, everything inside is done with the privileges of the owner of the procedure, so that the owner of the procedure needs the privileges on the tables, views, and other necessary procedures. The user who runs it must only EXECUTE privileges on the procedure itself.
AUTHID CURRENT_USER is as you have described above. One who executes the procedure needs privileges on all objects referenced in the procedure.

I don't have to do it, with a view, aren't I right? If I build a view and a PUBLIC SYNONYM for this point of view, and grant SELECT to the role that users have, they can see the data.

It's true. If, for example, they want to make reference to the view from their own point of view, or in the stored procedures, but no not just to use the view in queries, users need additional privileges. Notice that this is similar way privileges are dealt with in the AUTHID DEFINE procedures.

And to continue that - I - I also understood I must grant EXECUTE on each individual USER privileges and cannot accomplish role, with a packaged procedure?

No, EXECUTE privileges can be granted through roles.
Perhaps you are blend with the privileges of the object. If the procedure is AUTHID DEFINE, then the owner of the procedure must have all the necessary privileges granted directly, not by a role. This only applies to the owner; others who call the procedure just EXECUTE privilege, and it's okay if this privilege comes through a role.

I don't know very well your needs, but it looks like you want really a view and a way to specify settings that does not need to grant privileges to each individual user. If so, a view and a global temporary table to hold the settings, sounds like a good option. You can grant SELECT on the view privileges and all privileges on the global temporary table, in a role. users will no longer have this role.

If you want help, CREATE TABLE and INSERT to your base tables statements, two sets of parameters and the content of the display you want to see for each set of parameters.
Do you want the settings to default values? Give an example.

Tags: Database

Similar Questions

  • How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.

    Hello

    How can I force DAC to run always full load for one of the task that executes the stored procedure? And remaining tasks load incremental in the second and sub sequent executions.

    Thank you

    Jay.

    Hi if your task is running an informatica mapping you can set your DAC task to run the full mapping for incremental and full loads, so tab task just point to the mapping.

    Hope that helps.

    Thank you

  • I have creative cloud but I can't find in the package lead Edge and I need it for some exercises, how do I get it, thanks

    I have creative cloud but I can't find in the package lead Edge and I need it for some exercises, how do I get it, thanks

    You can also download it via the direct link:

    Direct download links of Adobe CC 2015: 2015 creative cloud release | ProDesignTools

  • I am looking to buy the package of photography and I have 2 PC at home - can I install this on multiple devices?

    I am looking to buy the package of photography and I have 2 PC at home - can I install this on multiple devices?

    Yes, you can install all software from Adobe on 2 computers which are mainly used by the same person but not both computers at the same time.

    This allows you to install on your desktop for work from home / office and a laptop when away from your home/office. But you cannot use LR and PS on both computers at the same time.

  • How to add damage to already bought the package of photoshop and lightroom

    I bought the package of photoshop and lightroom in summer 2015.  I must add aftereffects.  How can you do this?

    Use the unique App option:

    Pricing plans and creative Cloud membership | Adobe Creative Cloud

  • I am interested in buying the package of Photoshop, and Lightroom (9.99 per month) my question is if I download on my PC can I also use it on my iMac, or vice versa?

    I am interested in buying the package of Photoshop, and Lightroom (9.99 per month) my question is if I download on my PC can I also use it on my iMac, or vice versa?

    With the subscription, Yes, you can have it on PC and Mac.

  • I was handed this software this morning which is installed at the end of the day and I have never delt with cloud based adobe installation, I created the package this morning and have it installed on a machine but I'm not sure how to enable it

    I was handed this software this morning which is installed at the end of the day and I have never delt with cloud based adobe installation, I created the package this morning and have it installed on a machine but I'm not sure how to enable it

    Creative cloud learn & support

    http://helpx.Adobe.com/creative-cloud.html

    Cloud creation help / install, update or uninstall applications

    http://helpx.Adobe.com/creative-cloud/help/install-apps.html

  • Check the package/procedure for a user level privileges

    Hi gurus,
    How to check the package/procedure for a user-level privileges? as dba_tab_privs for the tables.

    for example: grant execute on User1 dbms_scheduler.
    now I must verify that user1 has run on dbms_scheduler privilege or not.

    What is the advice for this?

    Thanks in advance,
    Charles
    SQL> select privilege, count(*) from dba_tab_privs group by privilege order by 1;
    
    PRIVILEGE                       COUNT(*)
    ---------------------------------------- ----------
    ALTER                               19
    DEBUG                              256
    DELETE                              131
    DEQUEUE                            3
    EXECUTE                           19315
    FLASHBACK                          52
    INDEX                               14
    INSERT                              137
    MERGE VIEW                          36
    ON COMMIT REFRESH                     52
    QUERY REWRITE                          52
    
    PRIVILEGE                       COUNT(*)
    ---------------------------------------- ----------
    READ                                7
    REFERENCES                          54
    SELECT                                3752
    UNDER                                3
    UPDATE                              111
    WRITE                                5
    
    17 rows selected.
    

    DBA_TAB_PRIVS is more than simple tables.

  • Copy the package/procedure of a diagram to another diagram

    Dear all,

    I have two of the schema in a single database. I need to copy all A scheme procedures in scfhema B.Is there an easy way to copy only the packages and procedures? If there is no code existing please let me know.

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Regsards,

    S.Balraj

    Dear all,

    Here's the good explantion

    http://www.ulaska.com/Oracle/copy_object_between_schemas.html

  • Newbie - how to import the package, procedures, etc.?

    I used the "data export", the computer of the developer, expoty tables, export procedures, export Packages, etc. in a file
    SQL Developer.

    In Sql Developer, how to import tables, import procedures, import packages on my computer "REAL LIVE"?

    I want to copy the Package, the copy procedure, etc. 'computing Developer' to computer "LIVE REAL DATA?


    TIA
    Steve42

    If you have access to 2 databases of your sqldev client (and therefore have connections put in place for both of them), just run the export file obtained from the DB dev as a script (F5), using the connection to the production DB (drop-down menu at the top right).

    Have fun
    K.

  • receive the package throw starrt and end of frame

    I have wann process the packet received serial throwing start and end frame and recording the real package

    What is the format of the package? You can use the subset of string and the length of the string if it is a fixed size. If the start and end of the frame are unique (never appear in your data) you can remove it with a regular expression or search and replace all.

  • Where is the download of forms and reports 11g Release 2 (11.1.2.0.0)?

    Hello

    I managed to download one of the facilities for Forms 11 g from here:

    http://www.Oracle.com/technetwork/developer-tools/forms/downloads/index.html

    However the readme it says it's a patch 11.1 . for version 2.1.0 11.1.2.0.0

    Now I'm a bit confused when I go on this page that show requirements:

    Oracle Fusion Middleware 11g system requirements

    There is a download tab, but it is not.

    So, where is the download of 11.1.2.0.0?

    Thanks in advance,

    Richard

    If you take a look at the XLS I gave you (http://www.oracle.com/technetwork/developer-tools/forms/oracle-forms-111210certmatrix-1886127.xls) it says:

    Oracle Forms and reports 11.1.2.1.0 is certified with WebLogic Server and 10.3.5 and 10.3.6.

    It is therefore your choice between 10.3.5 and 10.3.6.

    see you soon

  • Integrating the CP5 My Own and Reporting a SCORE Quiz questions

    Science teacher trying to convince my Department to move toward paperless tests.

    Out of the Box, I find

    I learned how to use variables and advanced Actions to create several true/false questions on a single slide and report their scores.

    Is it possible to use MYscore variables change the score PROJECT variable?

    for example the EXPRESSION: "PROJECTSCORE" = v_MyQuestionScores + "PROJECTSCORES".

    Am I allowed to mess with project variables?

    Concerning

    Greg

    You are a GEM rod.

    I have visited the site you suggested and played the video intro and everything has answered my question.

    That is to say. N° !!! We cannot change the system variables. This interactive widget Master is supposed to support and coordinate all this for me. Need to try this out.

    Thanks again.

    Greg.

  • only install the services of forms and reports

    I need to run an application developed using Oracle Internet Developer suite 10 g on Windows.

    This application contains reports and simple shapes only.

    To deploy this application on the client machine, I want to just install oracle forms and report instead of application server services complete because the client computer PIII 1.0 GB of RAM.

    Everything is such Installer available?

    Where can I get it?

    I need to run an application developed using Oracle Internet Developer suite 10 g on Windows.

    If you have a very few clients (perhaps only?), you can use the machine where you have developed your application as your server. On the client you just need a browser.

  • How to run the packaged procedure with Ref Cursor

    Hello.
    The question may be very simple for you... but I was confused how to run
    I have the following package
    CREATE OR REPLACE PACKAGE CURSPKG AS 
        TYPE T_CURSOR IS REF CURSOR; 
        PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER, 
                                   IO_CURSOR IN OUT T_CURSOR); 
        
    END CURSPKG;
    / 
    
    
    CREATE OR REPLACE PACKAGE BODY CURSPKG AS
        PROCEDURE OPEN_ONE_CURSOR (N_EMPNO IN NUMBER,
                                   IO_CURSOR IN OUT T_CURSOR)
        IS 
            V_CURSOR T_CURSOR; 
        BEGIN 
            IF N_EMPNO <> 0 
            THEN
                 OPEN V_CURSOR FOR 
                 SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME 
                      FROM EMP, DEPT 
                      WHERE EMP.DEPTNO = DEPT.DEPTNO 
                      AND EMP.EMPNO = N_EMPNO;
    
            ELSE 
                 OPEN V_CURSOR FOR 
                 SELECT EMP.EMPNO, EMP.ENAME, DEPT.DEPTNO, DEPT.DNAME 
                      FROM EMP, DEPT 
                      WHERE EMP.DEPTNO = DEPT.DEPTNO;
    
            END IF;
            IO_CURSOR := V_CURSOR; 
        END OPEN_ONE_CURSOR; 
    
        
    END CURSPKG;
    /
    But I want to test (run) this procedure...
    But confused how to have Ref Cursor
    Could you help me in this...

    Thank you

    You must declare a variable of type T_CURSOR and pass it to the procedure like this.

    declare
      lOutCursor CURSPKG.T_CURSOR;
    begin
      CURSPKG.OPEN_ONE_CURSOR(, lOutCursor);
    end;
    

Maybe you are looking for