Issue group Variable

I defined a TierWinDir variable with a constant value of tst. on group work, I use dev. When the job runs it does not use the value on the working group.

Please notify. Thank you
Warren

Hey Warren,

This looks like a pretty good idea and then to treat one-off measures with a different value. So, I just wanted you develop your findings a bit with a group of work variable not based on a global variable.

Variables defined in definitions are known to be global variables (public), while the variables defined within a working group are variable local. Here at the working group level, you try to access TierWinDir.132 which is a global variable, and change its value. So, instead you create a local variable to the level of the Working Group and call the local_variable. Then the local variable can be assigned to the value of TierWinDir.132 (but not directly to the variable itself), and have passed local variable to the children jobs. And for one-offs, variable_locale values can be specified differently at the working group level.

ARO

The Derrick

Tags: Cisco DataCenter

Similar Questions

  • ORA-20001: unauthorized access (package for the undefined security group variable).

    I'm creating an application that uses the authentication of the APEX and characteristics (work) registration and forgot password forms (does not work).

    My I forgot the password is public (requires authentication). The user provides the user name and a secret answer, which are validated and then provides the new password. I try to use htmldb_util.reset_pw to reset the password of the user, but it does not work.

    I have a process on the new password page call a PL/SQL anonymous block that looks like this (see below), where username = P16_ITEM1 and P18_ITEM1 = new password.

    BEGIN
    apex_040000.htmldb_util.reset_pw (V ('P16_ITEM1'), V ('P18_ITEM1'));
    END;

    I don't know how to send a message of success/failure of such PL/SQL block to the APEX, but that's a separate issue, I guess.

    In any case, during the trial through SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:

    ORA-20001: unauthorized access (package for the undefined security group variable).
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 22
    ORA-06512: at "APEX_040000.WWV_FLOW_FND_USER_API", line 1220
    ORA-06512: at "APEX_040000.HTMLDB_UTIL", line 1253
    ORA-06512: at line 8 level

    I've searched previous discussions and tried different suggestions with no luck.

    I'm on Oracle DB 11g XE and APEX 4.x.

    Any help will be appreciated. Thank you

    Alex.

    In any case, during the trial through SQL Developer as the user with APEX_ADMINISTRATOR_ROLE, I get the following error:

    ORA-20001: unauthorized access (package for the undefined security group variable).

    When executing code outside the Apex which depends on the security defined Apex group, perform the following steps before your own code:

    wwv_flow_api.set_security_group_id(apex_util.find_security_group_id('YOUR_SCHEMA_NAME'));
    

    Google "wwv_flow_api.set_security_group_id" for more details, like this blog:

    http://www.easyapex.com/index.php?p=502

    -Morten

    http://ORA-00001.blogspot.com

  • Restart issues "Group Policy Client Service could not connect." "The media is write protected."

    The problem arises when a Norton message requires a reboot. It does not get me beyond the point when Windows prompts for a password. The words appear on screen reboot problems ' Customer Service Group Policy has no connect. " "The media is write protected."

    I cause the phone to crash in order to activate the Windows repair program.  It works but the custody of Norton is disabled. A program Norton Repair heals so that the fault.

    I had several chat sessions with Norton, but they now point me to Microsoft saying that it is a Windows program that is related to Norton.

    Hi ColinAW,

    Your computer is connected to a domain?

    The question could be linked to the program Norton himself. I suggest you try the following steps:

    Step 1: Disable Norton Security software; Follow the steps mentioned in the link below

    Disable antivirus software

    http://Windows.Microsoft.com/en-us/Windows-Vista/disable-antivirus-software

    Important: Activate security software once everything is done.

     

    Step 2: The computer in the boot and a test

    Follow step 1 in the link below,

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    If everything works well after a clean boot, you can deduce that some third-party services are at the origin of the problem.

    Continue with the remaining steps to pin-point on the third party service.

    After find you the program that is causing the problem, you will have to perhaps to update or install a newer version of the program, if you rarely use that you should consider uninstalling the software.

    Important: n ' forget not the computer to start normal follow step 7 in the link.

    If this problem occurs only updated Norton software, of course, the problem is related to the Norton software, and you can check with Norton again for any patches to address this issue.

    http://www.Symantec.com/Norton/support/index.jsp

    Thank you, and in what concerns:

    Ajay K

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • ISE - issue group identity

    Is there a way to match the groups active directory external to internal? It seems that I cannot use the internal groups in political posturing and politics of provisioning of customer. Is this correct?

    Hello

    You can create the policy so that the external group attribute ad is a component of the policy.

    When adding a new condition on the left side, select the advanced option, you'll see AD select it the external group attribute.

    From there, you can choose the operator followed by the value that you selected on the tab groups under Ad settings.

  • Issues group

    One of our groups gives error below, and we need to know what can be done to correct the problem.

    Configuration problems:

    R not enough resources to satisfy the Vsphere HA failover the cluster level

    This message is caused by the admission control, please see the links for some of the below troubleshooting tips:

    Not enough resources to meet the HA failover the cluster level

    VMware: Fixing of insufficient resources to meet the level of failover configured for HA. geekswing.com

  • Issues group layer

    I have problems with Photoshop CC. Every time I try to catch a layer in a layer set, I always get the whole group. I'm unable to grasp the different layers. I thought it was the fault of my Wacom pen but I reinstalled the latest driver, but it still doesn't let me select and move individual layers. I use the latest version of Photoshop CC. Any help greatly needed and appreciated. Layer

    Check the settings you use in the move tool. Very probably, set it to auto groups.

  • issue grouping RTF model

    Hi all
    I have a requirement as below.

    The report header section contains: order number,.
    Email_address,
    ..................

    the part of the body of the report contains the details of each order as

    Item number, name of the option
    ...
    Yet once the line section is based on the Group another, so it must be repeated for each group.

    My requirement is in the header for each order section and your email I need to repeat the whole header and a command line.

    Ex: Header: Order_number: 101
    E-mail: abc & gmail.com
    Section of the line:

    Here we have another group like demand_class

    DEMAND_CLASS: 'ABC '.
    Item1: abc,
    Article quantity1: 1

    DEMAND_CLASS: "DEF".

    Item2: abc,
    Article quantity2: 1
    ................


    Header: Order_number: 101
    E-mail: def & gmail.com - same data by e-mail only changed
    Section of the line:

    Here we have another group like demand_class

    DEMAND_CLASS: 'ABC '.
    Item1: abc,
    Article quantity1: 1

    DEMAND_CLASS: "DEF".

    Item2: abc,
    Article quantity2: 1
    ................







    Another section: to display the total calculation for each category of application for an order.


    My requirement is to repeat the same data for each order and your email address.

    Please help me on this

    example of output transmitted. Check your Inbox and let me know the necessary corrections.

  • navigateToUrl issue and variable

    I'm having a problem passage of variable in a local html file using an installed Air application. It works up to a point. I have a web page with a SWF which passes an array of string to the Air application which is already installed on the desktop computer. I know that the string arrray went because I can analyse in the aplication of the Air. I met a problem when I try to run a local html file with the array of strings as variables in the URLrequest. The launch.html is located in the same directory where the Application is installed. I have no problem, launch the file, it is not just to pass the variables with it. No clue as to why it does not save me from disaster.

    Here is the code:

    import flash.events.Event;
    to import flash.external.ExternalInterface;
    import flash.net.URLRequest;
    import flash.desktop.NativeApplication;
    import flash.events.InvokeEvent;
    import flash.utils. *;
    import flash.events.BrowserInvokeEvent;
    import flash.filesystem.File;
    import flash.errors.IOError;
    import flash.net.URLLoader;
    to import flash.net.URLVariables;
    import flash.net.URLLoaderDataFormat;
    import flash.net.URLRequestMethod;
    import flash.events.IOErrorEvent;
    import flash.net.navigateToURL;
    import flash.net.sendToURL;

    var: array of arguments;
    var dateString:String;
    var indexString:String;
    var videoTime:String;
    var videoIndex:String;
    var urlContent:String;
    var urlRequester:URLRequest;
    var variables: URLVariables;


    NativeApplication.nativeApplication.addEventListener (BrowserInvokeEvent.BROWSER_INVOKE, onBrowserInvokeEvent);

    var currentDir:File;
    function onBrowserInvokeEvent(invocation:BrowserInvokeEvent):void
    {
    arguments = invocation.arguments;
    videoTime = invocation.arguments [0] m:System.NET.SocketAddress.ToString ();
    videoIndex = invocation.arguments [1] m:System.NET.SocketAddress.ToString ();
    dateString = "dateString ="+ videoTime. ";
    indexString = "indexString =" + videoIndex;

    urlContent = "launch.html"+ "? ' + dateString + '&' + indexString;
    repCourant = invocation.currentDirectory;

    urlContent = "launch.html;
    urlRequester = new URLRequest (urlContent);
    variables = new URLVariables();
    variables.dateString = videoTime;
    variables.indexString = videoIndex;
    variable = urlRequester.data;
    Arguments.Text = variable. ToString(); / / outputs dateString = date & indexString = 1
    urlRequester.method = URLRequestMethod.GET;

    var htmlLoader:URLLoader = new URLLoader (urlRequester);
    htmlLoader.dataFormat = pouvez;
    htmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
    htmlLoader.addEventListener (Event.COMPLETE, URLLoaded);
    try {}
    htmlLoader.load (urlRequester);
    Arguments.Text = "Loaded";
    navigateToURL (urlRequester);
    }
    catch (error: Error) {}

    Arguments.Text = "Unable to load URL";
    }
    navigateToURL (urlRequester);

    }

    Reading the variable Javascript looks like this:

    < script type = "text/javascript" >

    var dateString;
    Window.OnLoad = Function)
    {
    var myQueryString = window.location.search;
    remove the '?' sign if exists
    myQueryString = myQueryString.substr (1, myQueryString.length - 1);
    dateString = myQueryString;
    }
    function show_alert()
    {
    alert (dateString); currently returns nothing
    }
    < /script >

    < / head >
    < body bgcolor = "#ffffff" style = "margin: 0px" >
    < input type = "button" onclick = "show_alert ()" value = "Display the alert message" / > "

    ......................

    Thanks in advance

    DoctorNic

    I've tested this in the AIR, both in the Flash Builder debugger and actual AIR application installed. Works very well. Try this as your document class:

    package {
        import flash.display.Sprite;
        import flash.events.MouseEvent;
        import flash.net.URLRequest;
        import flash.net.URLVariables;
        import flash.net.navigateToURL;
    
        public class Test extends Sprite {
            public function Test():void {
                init();
            }
    
            private function init():void {
                var button:Sprite = new Sprite();
                with(button.graphics){
                    beginFill(0);
                    drawRect(0, 0, 120, 40);
                }
                with(button){
                    x = 10;
                    y = 10;
                }
                addChild(button);
                button.addEventListener(MouseEvent.CLICK, click);
            }
    
            private function click(e:MouseEvent):void {
                launchHTML();
            }
    
            private function launchHTML():void {
                var urlReq:URLRequest = new URLRequest("assets/test.html");
                var urlVars:URLVariables = new URLVariables();
                urlVars.var1 = "Var 1";
                urlVars.var2 = "Var 2";
                urlReq.data = urlVars;
                navigateToURL(urlReq);
            }
        }
    }
    
  • Issue temporary Variables and columns of the Table

    Hello

    I have a table with two columns advanced region and add line features.

    First column is a messageChoice and the other column has two grains of messageLovInput. And according to the value of messageChoice that I have to make a fake messageLovInput.

    Now, I have attached SPEL with messageLovInput and attached to a partial action of fire with messageChoice.
    For what I create a PVO and added two variables in it.

    But now when I select any value of choice message its not showing regions lOV properly. It always shows lov single area only. No other one based on the value selected in the drop-down list.



    I hope I am clear.

    Satya

    Satya

    Rather than create a PVO I create transient attributes in the area of advanced table VO itself. So that you can get the reference to the line for each line.

    Thank you
    -Anil
    http://oracleanil.blogspot.com/

  • Session system variable ': GROUP '

    Dear friends,

    I'm having a problem with retrieving a value for the session system reserved variable: GROUP IN OBIEE 11.1.1.5
    What I read in other posts, I should be able to use: variable group after where clause, and if there are several groups assigned to a user INSTR should deal with this matter. However I can't get this to work.
    I use a variable here is the code

    Select "ORGANIZATIONS", s.ORGANIZATION_ID
    of s T_VZA_SECURITY
    where
    INSTR (": GROUP ', trim (s.group_id)") > 0
    -INSTR ("MyGroup', trim (s.group_id)") > 0


    I also tried to replace ": GROUP ' session variable with ' VALUEOF (NQ_SESSION." GROUP)"

    my security table
    create the table T_VZA_SECURITY
    (GROUP_ID VARCHAR (20),)
    ORGANIZATION_ID VARCHAR (20),
    OWNING_DEPARTMENT_ID VARCHAR (20),
    ASSIGNED_DEPARTMENT_ID VARCHAR (20)
    );

    Thank you

    Just to cut your discussio runs: 11g fills the ROLE, not the GROUP variable. Roles of application FMW FTW!

    http://obiee101.blogspot.com/2011/07/obiee11g-groups-are-roles-now.html

  • Horizontal GROUP init block is not create the variable

    Hello

    I have an Init Block to set the GROUP variable using an initialization. When I connect responses with a user and then check the Admin tool session variables, I don't see the GROUP variable anywhere. It seems that the init block not create it.

    I have the priority of implementation put in place the way it should be. I have groups created in the RPD and presentation Services. Here's my simple query to try to make it work:

    SELECT "GROUP", "OFFICER" OF THE DOUBLE
    UNION ALL
    SELECT 'GROUP', 'CONTROLLER' OF THE DOUBLE

    Any ideas?

    Thank you

    Published by: oroborus on March 24, 2010 13:25

    "Horizontal variables not displayed in monitor session Admin tool".

    Fix.

  • Variables collection using

    Could Hi you please help me with grouping variable values (output of the query)
    Here's the example I tried, but confusing to use the record variable.
    CREATE OR REPLACE PACKAGE Pkg_test 
    IS
      ----- Record Variable ----
      TYPE rec_job IS RECORD
       ( job1 varchar2(50),
         job2 varchar2(50),
         Rank varchar2(50)
       );
      TYPE typ_job IS TABLE OF rec_job
         INDEX BY VARCHAR2(500)  ;
      ---- Procedure Declaration ----
    PROCEDURE proc_job ( p_d1 IN   number, p_d2 number
                         o_Rat     OUT  typ_job );
    
    END Pkg_test 
    
    CREATE OR REPLACE PACKAGE BODY Pkg_test 
    IS
    
     PROCEDURE proc_job ( p_d1 IN   number default 10, p_d2 number default 20
                         o_Rat     OUT  typ_job )
      IS
    
    BEGIN 
       select e1_job,e2_job,
    case when e1_job =e2_job 
         then '0'
          else '1'
          end as Rating    into O_RAT -- How to use this collection variable 
           from (
    select distinct e1_job,e2_job , rank () over (partition by e1_job ,e2_job order by e1_SAL )rn
    from
    (select e1.job e1_job,e1.sal e1_sal,e2.job e2_job from
     emp e1 , emp e2 where e1.deptno =p_d1 and e2.deptno =p_d2 )
     ) where rn =1
    order by 1,2    
    
    -- How can i keep  e1_job ,e2_job ,Rating values into the collection variable  o_Rat.
    -- Could you hint me to do this                           
    end;
    Thank you

    Published by: Smile on 7 may 2012 10:50

    So many errors in the package Spec and body.

    To extract the records in a grouping variable use COLLECT in BULK

    See code below. I used the employees table. First of all try to understand the ESSENCE of COLLECT concept and then read below is the code.

    CREATE OR REPLACE PACKAGE Pkg_test
    IS
      ----- Record Variable ----
      TYPE rec_job IS RECORD
       ( job1 varchar2(50),
         job2 varchar2(50),
         Rank varchar2(50)
       );
      TYPE typ_job IS TABLE OF rec_job;
      ---- Procedure Declaration ----
    PROCEDURE proc_job ( p_d1 IN   number, p_d2 number,
                         o_Rat     OUT  typ_job );
    
    END Pkg_test;
    
    -- Package Body
    
    CREATE OR REPLACE PACKAGE BODY Pkg_test
    IS
    
     PROCEDURE proc_job ( p_d1 IN   number, p_d2 number, o_Rat     OUT  typ_job )
      IS
    
        -- Declare collection variable
    
        l_typ_job typ_job;
    
    BEGIN
       select e1_job,e2_job,
    case when e1_job =e2_job
         then '0'
          else '1'
          end as Rating    BULK COLLECT into l_typ_job -- How to use this collection variable
           from (
    select distinct e1_job,e2_job , rank () over (partition by e1_job ,e2_job order by e1_SAL )rn
    from
    (select e1.job_id e1_job,e1.salary e1_sal,e2.job_id e2_job from
     employees e1 , employees e2 where e1.department_id =p_d1 and e2.department_id =p_d2 )
     ) where rn =1
    order by 1,2;
    
    o_Rat:= l_typ_job;
    
    END proc_job;
    
    end;
    
  • DB groups updates appearing does not in OBIEE

    In the BI server, we have an authorization block that returns a database user groups. If we add or change memberships in the database table does not appear these changes to the user unless I have order and access your room or update the number of rows for this group in the BI Server. Caching is not enabled for the database or in the file NQSconfig.

    What do you mean by "the changes do not appear? Do not appear where? Do you use a group variable initialization? If so, have you disabled caching for it?

    -Dave

  • By the way where and group by clause Cursor

    I'm working on a procedure that generates a where clause clause and needs of a group by clause to return the correct results. I'm moving the two where and group variables in the cursor.

    The variables are is filled correctly, but when the cursor is created, variables are not in the cursor.

    Here's the code I'm working with. It is part of a package, but does no appeal to other parts of the package.

    PROCEDURE createFollowUpTask_Exposure (psUppgkedjetyp IN tis.tial.uppgkedjetyp%TYPE NULL by default,
    psAlarmtyp IN tis.tial.alarmtyp%TYPE by default NULL,
    psSubtyp IN tis.tial.subtyp%TYPE by default NULL,
    pnDays in NUMBER NULL by default,
    psKampkod IN tis.tiin.kampkod%TYPE by default NULL,
    psKatnr IN tis.tiin.katnr%TYPE by default NULL,
    psUtgava IN tis.tiin.utgava%TYPE by default NULL,
    psKatslag IN tis.tikg.katslag%TYPE by default NULL,
    psProdsyst IN tis.tikg.prodsyst%TYPE by default NULL,
    psUppgtyp IN tis.tiin.uppgtyp%TYPE by default NULL,
    psProdkod IN tis.tiin.prodkod%TYPE by default NULL,
    psStatus IN tis.tiin.status%TYPE by default NULL
    ) AS
    --
    cTIAL tis.tial%ROWTYPE;
    vLopnr tis.tial.lopnr%TYPE;
    vSqlWhere VARCHAR2 (4000);
    vGroupBy VARCHAR2 (1000): = "tiin.kampkod, tiin.abnr, tiko.fordsalj;
    cSelectCursor SYS_REFCURSOR;
    vSqlSelect VARCHAR2 (4000);
    psDays VARCHAR2 (50);
    cRec T_TIAL_REC;
    nCount number: = 0;

    --
    CURSOR cSqlSelect (SqlWhere IN VARCHAR2, GroupBy IN VARCHAR2) IS
    SELECT tiin.kampkod, tiin.abnr, tiko.fordsalj, MAX (tici.regdat) ALARMDATE
    OF tis.tiin
    JOIN tis.tiko ON tiin.kampkod = tiko.kampkod AND tiin.abnr = tiko.abnr
    JOIN core.tici ON tiin.kampkod = tici.kampkod AND tiin.abnr = tici.abnr AND tici.inplnr = tiin.inplnr
    WHERE 1 = 1 | SqlWhere
    GroupBy GROUP;
    --
    BEGIN
    -If these parameters are null, trigger the error
    IF psUppgkedjetyp IS NULL and psSubtyp IS NULL THEN
    raise_application_error (-20001,
    "String from the event or events must be assigned");
    END IF;
    -Fill the TIAL values
    IF psUppgkedjetyp IS NOT NULL THEN
    cTIAL.Uppgkedjetyp: = psUppgkedjetyp;
    END IF;
    --
    IF psAlarmtyp IS NOT NULL THEN
    cTIAL.Alarmtyp: = psAlarmtyp;
    END IF;
    --
    cTIAL.Handklass: = 't';
    cTIAL.Blobid: = 0;
    --
    IF pnDays IS NOT NULL THEN
    psDays: = '+' | pnDays;
    END IF;
    IF psSubtyp IS NOT NULL THEN
    cTIAL.Subtyp: = psSubtyp;
    END IF;
    -Create Where clause for cursor
    vSqlWhere: = ";
    IF psKampkod IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tiin.kampkod ="' | psKampkod | " ' ;
    END IF;
    --
    IF psKatnr IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tiin.katnr ="' | psKatnr | " ' ;
    END IF;
    --
    IF psUtgava IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tiin.utgava ="' | psUtgava | " ' ;
    END IF;
    --
    IF psKatslag IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tikg.katslag ="' | psKatslag | " ' ;
    END IF;
    --
    IF psProdsyst IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tikg.prodsyst ="' | psProdsyst | " ' ;
    END IF;
    --
    IF psUppgtyp IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tiin.uppgtyp ="' | psUppgtyp | " ' ;
    END IF;
    --
    IF psProdkod IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tiin.prodkod ="' | psProdkod | " ' ;
    END IF;
    --
    IF psStatus IS NOT NULL THEN
    vSqlWhere: = vSqlWhere | "AND tiin.status ="' | psStatus | " ' ;
    END IF;
    -Browse all records in input parameters of the meeting and set values required TIAL.
    I'm IN cSqlSelect (vSqlWhere, vGroupBy)
    --
    LOOP
    -EXTRACT cSelectCursor INTO cRec;
    cTIAL.Kampkod: = ";
    cTIAL.Abnr: = ";
    cTIAL.Sign: = ";
    cTIAL.Alarmdate: = ";
    cTIAL.Kampkod: = i.Kampkod;
    cTIAL.Abnr: = i.Abnr;
    cTIAL.Sign: = i.fordsalj;
    cTIAL.Alarmdate: = i.alarmdate;
    --
    nCount: = nCount + 1;
    --
    IF vLopnr = - 1 THEN
    raise_application_error (-20002,
    "Error creating task for: ' | '. cTIAL.Kampkod |' '|| cTIAL.Abnr |' Sales representative: ' | cTIAL.Alarmdate);
    END IF;
    END LOOP;
    DBMS_OUTPUT. Put_line (' I created ' | nCount |) "documents.");



    END createFollowUpTask_Exposure;

    Thanks in advance for any help.

    Hello

    Welcome to the forum!

    Try this (untested) example:

    PROCEDURE createFollowUpTask_Exposure(psUppgkedjetyp IN tis.tial.uppgkedjetyp%TYPE DEFAULT NULL,
                                          psAlarmtyp     IN tis.tial.alarmtyp%TYPE DEFAULT NULL,
                                          psSubtyp       IN tis.tial.subtyp%TYPE DEFAULT NULL,
                                          pnDays         IN NUMBER DEFAULT NULL,
                                          psKampkod      IN tis.tiin.kampkod%TYPE DEFAULT NULL,
                                          psKatnr        IN tis.tiin.katnr%TYPE DEFAULT NULL,
                                          psUtgava       IN tis.tiin.utgava%TYPE DEFAULT NULL,
                                          psKatslag      IN tis.tikg.katslag%TYPE DEFAULT NULL,
                                          psProdsyst     IN tis.tikg.prodsyst%TYPE DEFAULT NULL,
                                          psUppgtyp      IN tis.tiin.uppgtyp%TYPE DEFAULT NULL,
                                          psProdkod      IN tis.tiin.prodkod%TYPE DEFAULT NULL,
                                          psStatus       IN tis.tiin.status%TYPE DEFAULT NULL) AS
       --
       cTIAL         tis.tial%ROWTYPE;
       vLopnr        tis.tial.lopnr%TYPE;
       vSqlWhere     VARCHAR2(4000);
       vGroupBy      VARCHAR2(1000) := ' tiin.kampkod, tiin.abnr, tiko.fordsalj';
       cSelectCursor SYS_REFCURSOR;
       vSqlSelect    VARCHAR2(4000);
       psDays        VARCHAR2(50);
       cRec          T_TIAL_REC;
       nCount        NUMBER := 0;
    
       FUNCTION fnc_cSqlSelect(SqlWhere IN VARCHAR2,
                               GroupBy  IN VARCHAR2) RETURN VARCHAR2 IS
       BEGIN
          RETURN 'SELECT tiin.kampkod,
                 tiin.abnr,
                 tiko.fordsalj,
                 MAX(tici.regdat) ALARMDATE
            FROM tis.tiin
            JOIN tis.tiko ON tiin.kampkod = tiko.kampkod
                         AND tiin.abnr = tiko.abnr
            JOIN core.tici ON tiin.kampkod = tici.kampkod
                          AND tiin.abnr = tici.abnr
                          AND tici.inplnr = tiin.inplnr
           WHERE 1 = 1 ' || SqlWhere || ' GROUP BY ' || GroupBy;
       END fnc_cSqlSelect;
    
    BEGIN
       -- If these parameters are null, raise error
       IF psUppgkedjetyp IS NULL AND psSubtyp IS NULL THEN
          raise_application_error(-20001,
                                  'Either Event Chain or Starting Event must be assigned');
       END IF;
       -- Populate TIAL values
       IF psUppgkedjetyp IS NOT NULL THEN
          cTIAL.Uppgkedjetyp := psUppgkedjetyp;
       END IF;
       --
       IF psAlarmtyp IS NOT NULL THEN
          cTIAL.Alarmtyp := psAlarmtyp;
       END IF;
       --
       cTIAL.Handklass := 'T';
       cTIAL.Blobid    := 0;
       --
       IF pnDays IS NOT NULL THEN
          psDays := '+ ' || pnDays;
       END IF;
       IF psSubtyp IS NOT NULL THEN
          cTIAL.Subtyp := psSubtyp;
       END IF;
       -- Create Where clause for cursor
       vSqlWhere := '';
       IF psKampkod IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tiin.kampkod = ''' || psKampkod || '''';
       END IF;
       --
       IF psKatnr IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tiin.katnr = ''' || psKatnr || '''';
       END IF;
       --
       IF psUtgava IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tiin.utgava = ''' || psUtgava || '''';
       END IF;
       --
       IF psKatslag IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tikg.katslag = ''' || psKatslag || '''';
       END IF;
       --
       IF psProdsyst IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tikg.prodsyst = ''' || psProdsyst || '''';
       END IF;
       --
       IF psUppgtyp IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tiin.uppgtyp = ''' || psUppgtyp || '''';
       END IF;
       --
       IF psProdkod IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tiin.prodkod = ''' || psProdkod || '''';
       END IF;
       --
       IF psStatus IS NOT NULL THEN
          vSqlWhere := vSqlWhere || ' AND tiin.status = ''' || psStatus || '''';
       END IF;ç
       -- Loop through all records meeting input parameters and set required TIAL values.
       OPEN cSelectCursor FOR fnc_cSqlSelect(vSqlWhere,
                                             vGroupBy);
    
       LOOP
          FETCH cSelectCursor
             INTO v; -- You must define a variable 'v' to hold the data of cursor
          EXIT WHEN cSelectCursor%NOTFOUND;
    
          --FETCH cSelectCursor INTO cRec;
          cTIAL.Kampkod   := '';
          cTIAL.Abnr      := '';
          cTIAL.Sign      := '';
          cTIAL.Alarmdate := '';
          cTIAL.Kampkod   := i.Kampkod;
          cTIAL.Abnr      := i.Abnr;
          cTIAL.Sign      := i.fordsalj;
          cTIAL.Alarmdate := i.alarmdate;
          --
          nCount := nCount + 1;
          --
          IF vLopnr = -1 THEN
             raise_application_error(-20002,
                                     'Error Creating task for: ' || cTIAL.Kampkod || ' ' ||
                                     cTIAL.Abnr || ' Sales Rep: ' || cTIAL.Alarmdate);
          END IF;
       END LOOP;
    
       CLOSE cSelectCursor;
    
       DBMS_OUTPUT.PUT_LINE('I created ' || nCount || ' records.');
    
    END createFollowUpTask_Exposure;
    /
    

    Kind regards

  • Feature helps performance call (COLLECTION ITERATOR PICKLER FETCH)

    11.2.0.3

    Solaris 10

    I need assistance with our implementation of the policy of restricting access. From our plans of execution and trace files, we see our political function run when querying tables restricted. This, of course, is planned and is done in a hash against the returned results join by the query . The function fills a set IDs based on the roles that the user has and pushes those predicates against object_1.

    -------------------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

    -------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                  |  5331 |   786K |  1358 (21) | 00:00:03:

    |*  1 |  HASH JOIN RIGHT SEMI |                  |  5331 |   786K |  1358 (21) | 00:00:03:

    |   2.   COLLECTION ITERATOR PICKLER FETCH | GET_PERMISSIONS | 16360. 32720 |    20 (10) | 01:00:00 |

    |   3.   TABLE ACCESS FULL | OBJECT_1 |   634K |    90 M |  1302 (19) | 00:00:03:

    -------------------------------------------------------------------------------------------------------

    The problem we have is with reports where the optimizer find it more effective to make an IMBRIQUEE LOOP between an object and the object of access restricted. The function is then called as as many times as the operation of nested loop runs. When a report may take a few seconds, it will be take minutes to complete because the function is called thousands of times. These reports are very long and complex but below is an example where I forced the nested loop (query takes too long without additional predicate).

    SELECT / * + USE_NL (obj1, obj2) * /.

    Ob1.ID

    Of ob1, ob2 object_2 object_1

    WHERE ob1.obj2_id = ob2.id (+) AND obj1.obj_name IN ('SOME_VALUE');

    ---------------------------------------------------------------------------------------------------------

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time     |

    ---------------------------------------------------------------------------------------------------------

    |   0 | SELECT STATEMENT |                  |  3620 |   190K |   137 (2) | 01:00:00 |

    |   1.  NESTED EXTERNAL LOOPS |                  |  3620 |   190K |   137 (2) | 01:00:00 |

    |   2.   TABLE ACCESS BY INDEX ROWID | OBJECT_1 |  3620 |   123K |   135 (1) | 00:00:01 |

    |*  3 |    INDEX SKIP SCAN | OBJECT1_FK_I |  3620 |       |    22 (0) | 01:00:00 |

    |   4.   SEE PUSHED PREDICATE. OBJECT_2 |     1.    19.     1 (0) | 01:00:00 |

    |   5.    SEMI NESTED LOOPS.                  |     1.    19.    21 (10) | 01:00:00 |

    |   6.     TABLE ACCESS BY INDEX ROWID | OBJECT_2 |     1.    17.     1 (0) | 01:00:00 |

    |*  7 |      INDEX UNIQUE SCAN | OBJECT_2_PK |     1.       |     1 (0) | 01:00:00 |

    |*  8 |     COLLECTION ITERATOR PICKLER FETCH | GET_PERMISSIONS |   137.   274.    20 (10) | 01:00:00 |

    ---------------------------------------------------------------------------------------------------------

    We have reports where the function is called more than 100 000 times and can take 12 minutes additional to complete. I'm not the developer of these reports or our policies, but I do my best to help in tune. I can force it to use hash joins, where possible, and the time of the request is excellent. There is, Unfortunately, thousands of these reports with different degrees of performance degradation because this function so that the developers are wondering if there are other alternatives. Is there a way to tell the optimizer to use of hash joins when dealing with this function? I looked at using different policy types (currently "SHARED_CONTEXT_SENSITIVE"), but neither contributed to improve performance. I've been all over the internet and have not been able to find a similar situation. I tried to be comprehensive, but I do not know I missed some vital information, then please let me know if I can explain it. Thoughts appreciated.

    Thank you.

    CREATE OR REPLACE FORCE VIEW SOME_SCHEMA. SECURITY_ID_TEMP

    (

    ID,

    CONT_CN

    )

    AS

    SELECT id, cont_cn

    TABLE (CAST (some_pkg.get_ids AS rls_array)) t;

    And this latter view is probably what is causing the problem. That's what I said in my answer:

    A possible explanation is that your political function is a predicate that uses a collection.
    . . .
    Probably the political predicate sometimes involves a small number of elements and many other times.

    And it is the predicate that you just posted:

    IF ii_user_is_exempt (some_user)

    THEN

    predicate: = NULL;

    ON THE OTHER

    predicate: = 'security_id in (select id from security_id_v);

    END IF;

    RETURN of predicate;

    The policy predicate is querying a view based on a collection. How the optimizer supposed to know how "rows" are in this collection 'rls_array' which is used as if it were a table?

    As you return a NULL predicate in some cases. I've never tested it, but I would warn against it. See the doc of security

    http://docs.Oracle.com/CD/E25054_01/network.1111/e16543/VPD.htm#CIHBEIFC

    Creating a function to generate the dynamic WHERE Clause

    To generate the dynamics WHERE clause (predicate), you must create a function (not a procedure) which defines the restrictions you want to apply. In general, the security administrator creates this function in its own schema. For a more complex behavior, such as including other functions or adding controls to track logon attempts, create these features within a package.

    The function should have the following behavior:

    • It takes as arguments a scheme name and a name of object (table, view, or synonym) as inputs. Set the input parameters to contain this information, but do not specify the schema name and object themselves within the service. The strategy that you create with the DBMS_RLS (described in "creating a policy to attach the function to the objects you want to protect") provides the namespace of the schema and object to which the policy applies. You must create the parameter for the schema first, the setting for the object.
    • It must provide a return value for the predicate in the WHERE clause that will be generated. The return value for the WHERE article is always a VARCHAR2 data type.
    • It must generate a valid WHERE clause. This code can be as simple as the example in "tutorial: creating a Simple Oracle virtual private Database Policy ', in that its WHERE clause is the same for all users who log on.

    I wonder the use of this collection as part of your policy mechanism.

    TABLE (CAST (some_pkg.get_ids AS rls_array)) t;

    First - each user has its own State of package. This means that each user has its own collection; This isn't a master collection (ID game) that is shared by all users. A real table, is where the data will be shared by all users should exist.

    Second - this function 'get_ids' (I guess this is a feature rather than a grouping variable?) may actually be to interview one or more tables every time it is called. This means that EACH query that performs a user must first call that 'get_ids' that works while it asks a few real tables to obtain information and make a collection.

    Even if a required collection to be used it must be created ONCE and then come back as needed.

    This security architecture raises some red flags for me. It's the first thing that I looked at.

    Yes, I know, any changes that might involve serious implications and require a substantial analysis, testing and implementation. But my suspicion is that where the root of the problem.

    My assumption is at this time that your collection of 'rls_array', used as a table, is the cause of the problem. Oracle does not have statistics on the result set of this "table", and of one query to another, has no way to know if the number of 'lines' changes significantly.

    Oracle could use some dynamic sampling to try to estimate things and inspiring that sampling is changing the execution plan. You could try to find a query which causes problems and to see how the number of items in collection compares the number of a normal query.

    Short of this thorough/fix analysis which I think is necessary, your best bet may be to investigate pinning on an implementation plan; forcing the use of a basic plan for this query little matter that runs it.

    If you want to study Sql Plan Management and this way opens up a new thread for this issue/question and provide a link to the current thread.

    Here is an article from Oracle to become familiar with SPM

    http://www.Oracle.com/technetwork/issue-archive/2009/09-Mar/o29spm-092092.html

    And here is sample thread "How to force Oracle to use an implementation Plan" to give you an idea of the use of the mechanism.

    https://community.Oracle.com/thread/991149?TSTART=0

    See Jonathan Lewis's response in this thread.

    There are many other threads and documentation, SPM, if you want to continue that.

Maybe you are looking for