Allow only specific users based on the list of users in a table

We have a situation where we allow specific users that are stored in a table.
create table ALLOW_USERS (username varchar2(30) );

CREATE OR REPLACE TRIGGER USERS_TRIGGER
   AFTER LOGON
   ON DATABASE
DECLARE
BEGIN
  IF DBMS_STANDARD.LOGIN_USER NOT IN (SELECT USERNAME FROM ALLOW_USERS)

         THEN
               RAISE_APPLICATION_ERROR (-20001, 'Unauthorized login');
       END IF;
END;
/

Warning: Trigger created with compilation errors.

SQL> show error
Errors for TRIGGER USERS_TRIGGER:

LINE/COL ERROR
-------- -----------------------------------------------------------------
3/3      PL/SQL: Statement ignored
3/38     PLS-00405: subquery not allowed in this context
How to use the subquery above the trigger? or is there a better way to achieve required results.

-Thank you

I'm surpised nobody reported to functions attribute Event for customer event triggers and ora_login_user in particular:

CREATE OR REPLACE
  TRIGGER NOT_SYS.RESTRICTED_USERS_TRIG
    AFTER LOGON
    ON DATABASE
    DECLARE
        v_cnt NUMBER;
    BEGIN
        SELECT  COUNT(*)
          INTO  v_cnt
          FROM  not_system.ALLOW_RESTRICTED_USERS
          WHERE username = ora_login_user;
        IF v_cnt = 0
          THEN
            RAISE_APPLICATION_ERROR(-20001,'Unauthorized login');
        END IF;
END;
/ 

SY.

Published by: Solomon Yakobson on June 3, 2013 15:43

Tags: Database

Similar Questions

  • Responsibility to allow only for user password resets (for personal help from the front desk)

    Hi all

    Someone managed to create a responsibility to allow only the password resets? The idea is to assign this responsibility to our office staff help password reset requests. They will not have the opportunity to do anything outside of search for users, and then reset the password. This would allow a large number of the number of tickets to be processed directly by our help desk staff.

    Any information would be greatly appreciated.

    Hello

    Create a custom liability (similar to the system administrator), which only has the (security > user > set) screen.

    Why don't you use reset them password 'features' "that comes with the application? See (Note: 399766,1 - FAQ of the Reset password feature) and (Note: 763352.1 - how to set "password forgotten"to work without treatment in 11i?) For more details.

    Kind regards
    Hussein

  • Progress based on the list of the folder with multiple files in a folder

    I use the function list folder of LabVIEW and want to see progress, because it takes a long time (20 seconds) to load all the files in an array.

    How can I do this?

    See ListFolder exemple.jpg

    Regards Ben Arts

    Ben Arts wrote:

    I showed a small image is everything to do the job.

    There are about 3000 files and the file is a server.

    Well, who would certainly do, as much as you said that it is on a server, so a network drive.

    In this case, I was looking for a progress for the folder in the list to use it in an indicator of progress for the user.

    Unfortunately, there is no mechanism for it. Maybe you can organize the files so that you can get a list of them in 'chunks', based on a search pattern. Or perhaps you can organize them into folders so that you dynamically fill subfolders when a user wants to see what is inside.

    Cancellation: having 3000 + files in a folder is a bad way to orgranize files, especially on a server, as leading to a huge amount of e/s files and network I/O on the server load.

  • New to SSL VPN, can I tunnel specific networks without specifying the list of applications with Smart tunnels?

    Hello

    I'm all new to SSL VPN, and I am a bit lost... I tried to get SSL VPN to go for our company and we have been asked to deploy a completely clientless solution that will provide access to our network based on subnets. Is this possible with the chip-tunnels? I tried a few different configurations and it doesn't seem to work. It works with ANYCONNECT but we have to go without a client. They feel that we can do without customer access to destination networks. Is this possible?

    Thank you in advance...

    That's what you can do with a solution without a client:

    1. Allow access to web resources (using the url list)
    2. Allow access to the application of TCP based (using java-port forwarding or smart tunnels)

    If you have to give access to all subnets, then you will need to go full tunnel effect which is Anyconnect SSL.

    HTH

  • Allow only specific APEX App via Oracle Http Server

    Hello

    I have some difficulty to fix my Oracle APEX + Oracle HTTP Server environment.

    There are currently about 20 Applications that run on the server of the APEX, and I want to publish 2 of them outdoors for the users.

    I added a certificate in Oracle Wallet Manager to ensure the OHS, but I can access all Applications on the server of the APEX by changing just the suffix of the ID of the Application.

    How can allow only two applications accessible via internet?

    Concerning

    Hello

    Well, need us so much more information.

    You can edit a zip file of all the relevant configuration file, or you could send them to me at [email protected].

    Then I take a look and we can post the result here.

    It should also be completely specified URL that you use since you seem so use the virtual hosting.

    See you soon,.
    Dietmar.

  • Allowing only certain users (or groups) make profile changes

    Hello

    I work on a requirement here that has the following scenario:
    -Permanent employee cannot change their own attributes through my account profile
    -Employee can change their attributes through my account profile
    -Permanent/temporary employee Type field values are

    So, we follow the steps:
    -Created 2 groups of users on IOM (permanent and temporary)
    -Definition of membership rules that checks the Employee Type attribute and add the user automatically to a group of IOM (permanent and temporary)
    -Set up permissions for object data, form = users and unchecked "allow Update" the temporary group. I have not configured for the Standing Group

    Test 1:
    -The end user test is part of the Group standing (and all USERS by default. It cannot be deleted)
    -Login as the end user test and on his family name change
    Performance(1):
    -The name has been changed, but should not
    Pharmacodependance1: I have implemented only the temporary group to be able to change this IOM should block this change request


    Test 2:
    -J' deleted user test by the Standing Group and only all USERS, which is by default on the left
    -Set up permissions for object data, form = users and unchecked "allow Update" for the group all USERS. I removed the other groups
    Result 2:
    -It worked! I could make no change because the group all USERS cannot change their values (update permission is not checked)
    Problem2:
    Am I misunderstood the real meaning of the data object permissions? Why it worked for all USERS but not for other custom groups?

    Concerning
    Hugo

    It is a common use case. The classic solutions to this problem are the following:

    1. create a custom menu item or a custom user interface. Not bad work but also a lot of flexibility.
    2. change the OOTB JSP to get the features you want. Some work and IOM upgrade issues but less work than option 1.
    3. apply the update of the USR form as a resource object. You can access the workflow approval etc.. Not that much work. He must find a way to stop users 'HR reliable source' ask the object (or implement an automated system of rejection)

    Hope this helps
    / Martin

  • Problem with the creation of New and subfolders only appear is not in the list

    Thunderbird is allowing the creation of some New & subfolders, but they aren't always in the list each time.

    Photo shows the current list, but they tried to get money records IMarEST & Bank. (My apologies for Hypersnap stamps)
    Sorry, but the photo is not download!

    I use the Windows x 86 Version 8.1 - Thunderbird 31.6.0

    How to subscribe to see the imap folders:

    • Right click on your email account name, and then select 'subscribe '.
    • IMAP folders available on the server will be listed.
    • Select the ones you want to add to your e-mail client
    • Click the button to subscribe.
    • Press the OK button
  • Should I buy a disc to reinstall Windows to fix all my computer problems based on the list below to start? Thank you. Any help welcome and appreciated.

    • my firewall will not turn an error message that says that my Windows Firewall on d/t / / service of Sharing (ICS) connection does not work correctly or is disabled.
    • I get error messages on my computer is in danger due to the McAfee needs attention and does not protect from my computer, then I check and it's good, or once and a while the real-time scanning enabled disabled or sometimes the firewall. I do not turn off these.
    • I get error messages from microsoft repeated that specifies the needs of microsoft windows to stop and I want to send an error message. Most of the time I send a.
    • I get the error message when you try to copy an album purchased from i-tunes, on a blank disc that something is wrong with my audio/video service does not properly or is not available.
    • I also learned today to buy or borrow a reinstallation of Windows XP Edition family drive, because I did not. I do? Help, please. Thank you.
    • The list is long, but it's for beginners. I don't have the money to take it to a store and need for some online business.

    Hello

    · What is the number and the model of the computer?

    · Were there any changes made on the computer before the show?

    · Who is the service pack installed?

    Check is it y of error codes and error message appears in Event Viewer: how to view and manage the event logs in Event Viewer in Windows XP: http://support.microsoft.com/kb/308427

    1. I suggest you try the steps listed in the link below: you cannot start the Windows Firewall service in Windows XP SP2: http://support.microsoft.com/kb/920074

    2 run the checker system files on the computer. Link, we can see: Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe): http://support.microsoft.com/kb/310747

    Note that: if he asks you the service pack CD, follow these steps from the link: you are prompted to insert a Windows XP SP2 CD when you try to run the tool on a Windows XP SP2 computer system File Checker: http://support.microsoft.com/kb/900910 (valid for Service pack 3)

  • Based on the list of components with drag-/ dropEnabled = true can not coexist with other moveable components

    Hello Flexers,

    because I find it a bit difficult to describe the problem I will try that after posting the code and a screenshot:


    <s:Application
         xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         width="100%" height="100%">
        
         <s:layout><s:HorizontalLayout/></s:layout>
        
         <fx:Script>
              <![CDATA[
                   import mx.core.IUIComponent;
                   import mx.core.IVisualElement;
                   import mx.events.DragEvent;
                   import mx.managers.DragManager;
                  
                   protected function draggableLabel_mouseDownHandler(event:MouseEvent):void {
                        DragManager.doDrag(event.currentTarget as IUIComponent,null,event);
                   }
                  
                   protected function leftGroup_dragEnterHandler(event:DragEvent):void {
                        DragManager.acceptDragDrop(event.currentTarget as IUIComponent);
                   }
                  
                  
                   protected function leftGroup_dragDropHandler(event:DragEvent):void {
                        leftGroup.addElement(event.dragInitiator as IVisualElement);
                   }
                  
              ]]>
         </fx:Script>
        
        
         <s:List id="leftList"
              dragEnabled="true"
              dropEnabled="true"
              width="200" height="200">
              <s:ArrayCollection>
                   <fx:String>Item 1</fx:String>
                   <fx:String>Item 2</fx:String>
                   <fx:String>Item 3</fx:String>
              </s:ArrayCollection>
         </s:List>
        
         <s:List id="rightList"
              dragEnabled="true"
              dropEnabled="true"
              width="200" height="200">
              <s:ArrayCollection>
                   <fx:String>Item 4</fx:String>
                   <fx:String>Item 5</fx:String>
                   <fx:String>Item 6</fx:String>
              </s:ArrayCollection>
         </s:List>
        
         <s:Group id="leftGroup"
              dragEnter="leftGroup_dragEnterHandler(event)"
              dragDrop="leftGroup_dragDropHandler(event)"
              width="200" height="200">

              <s:Rect left="0" right="0" bottom="0" top="0">
                   <s:fill><s:SolidColor color="0x00FF00"/></s:fill>
              </s:Rect>

         </s:Group>
        
         <s:Group id="rightGroup"
              width="200" height="200">

              <s:Rect left="0" right="0" bottom="0" top="0">
                   <s:fill><s:SolidColor color="0xFF0000"/></s:fill>
              </s:Rect>

              <s:Label text="DRAG ME"
                             color="0x000000"
                             mouseDown="draggableLabel_mouseDownHandler(event)"
                             y="0"/>
              <s:Label text="DRAG ME"
                             color="0x000000"
                             mouseDown="draggableLabel_mouseDownHandler(event)"
                             y="40"/>
              <s:Label text="DRAG ME"
                             color="0x000000"
                             mouseDown="draggableLabel_mouseDownHandler(event)"
                             y="80"/>
            </s:Group>
        
    </s:Application>

    DragDrop.png

    I came across a problem recently. I wanted to be able to use drag - and list controls dropEnabled property and (on the same canvas) use the functionality of drag-and-drop automatic implemented other components (in this case, a combination of movable labels that can drag a group component). I wanted the labels to be moved in the entire screen, but only fall on the part of the Group (NOT the list). The items in the components list were supposed to be interchangeable between the lists in the set of properties dragEnabled and dropEnabled to true. The problem is that when I drag the labels of the groups on the lists a null #1009 object reference error is thrown because the list does not try to calculate the index fall for labels. I know that I could work around the problem by setting dropEnabled = false on the lists and implement drag - move by hand, but I hope that both variants of drag-and-drop coexist in a spirit of flexibility.

    Any thoughts? Thank you very much!

    Kind regards

    Thilo

    When you delete something on a spark list you will need to provide a dragSource not null in the format 'itemsByIndex', if you change your code to something like this, it should work:

    protected function draggableLabel_mouseDownHandler(event:MouseEvent):void {}
                   
    do some data to pass to the list
    var someData:Vector. = new Vector. ();
    someData.push ("hello world");
                   
    List is waiting for data to slip with the format "itemsByIndex".
    var dragData:DragSource = new DragSource();
    dragData.addData (someData, "itemsByIndex");
                   
    DragManager.doDrag (event.currentTarget IUIComponent, dragData, events);
    }

  • Fill in a text box based on the list box selection?

    I'm relatively new to using scripts in forms.  So I hope that someone can help me here.

    I have a list box called 'Name', which uses the user selects a name.  I have a text box called "DOB", I need to be filled in automatically with the date of birth of the corresponding name that has been selected.

    I tried to adapt some scripts to fit my needs here, but nothing helps.  Although it seems like it should be pretty easy.  Any ideas?  Thanks in advance for the answers.

    ' 1. fill the list box with the name of "and place the date of birth in the option 'value exprot '.

    2. for action 'on blurr"add the following script:

    this.getField('DOB').value = event.value;

    When you tab or the mouse out of the list box, the value displayed in the field "DOB".

  • How to use a list in a query so that you can sort the list according to an attached table?

    1. my initial query returns the phone numbers with inconsistent structures. Example:

    -555 (555) - 5678

    666-555-5678.

    555.5678 (444)

    1-888-555-5678

    2. I have to loop through the list and perform a certain number of cleaning functions, this is why the list looks like this:

    555-555-5678.

    666-555-5678.

    444-555-5678.

    888-555-5678.

    3. now, I need to use this list in a query, if I can use the first three digits to seek a regional indicative table sign and its link and be able to sort by area code. The indicative table looks like this:

    ThreeDigitCode AreaID

    555                         1

    666                         2

    444                         1

    888                         4

    I need to put the phone in the query list, so I can do a search of the areaID and the comparable information to a table that says AreaID 1 is Eastern and his sort-position is 1, etc..

    Thanks in advance for your advice.

    You can add an empty your query column, when you select the phone

    numbers and use this column to store the ThreeDigitCode:

    SELECT phone_number, '' as threeDigitCode FROM #your_table#
    

    then clean up the numbers and place the 3 digits in others

    column. And then using query of query to join phone numbers with

    area codes:

    
      
    
    
    
      SELECT *
      FROM phone_number
        INNER JOIN area_codes ON area_codes.threeDigitCode =
    phone_number.threeDigitCode
    
    

    Mack

  • Allow only certain users to use the Security Server

    Hi all

    I'm looking at a way to allow users to work from home using a security server (works like a charm) BUT I don't want all my users can connect at home. This is the default behavior.

    Tags are an option, but it requires me to create a separate pool for users, who use desktop clone thin even as an "ordinary" users

    Is there a way to activate this feature (because it works in vpn etc.)?

    You can enable VPN for those users only. the other way is if you have the RSA in your environment, you can enable these people in a pool that would have required RSA authentication...  http://communities.VMware.com/thread/306690?TSTART=0

  • Allow only authenticated users to access the internet

    Hi guys.

    I have a 5510 ASA with IOS 8.4. I want that only authenticated active directory of users can get through the firewall.

    I don't have any idea how to resolve this.

    Can someone give me a hint?

    WBR

    Robert Fenz

    Robert,

    You can also take a look at the ASA next feature:

    PIX / ASA: Passage of the Proxy for access network using GANYMEDE + and RADIUS Server Configuration Example

    http://www.Cisco.com/en/us/partner/products/HW/vpndevc/ps2030/products_configuration_example09186a00807349e7.shtml

    The foregoing applies only if you have a GANYMEDE + or RADIUS of a backend if authentication server server.

    Kind regards.

  • List box and the choice list showing only 25 first items on the list

    Hi people,

    I implemented a component selectOneChoice for locations and a selectOneListbox for asset groups. Two display objects are based on relevant queries. When you try to choose a location, I see only the items in 25 list first in the drop-down list. It's the same thing with the Group of assets held as well. Queries provide a set of data that has more than 25 records of each of the db. Are there property that must be set for these components in JDeveloper? I use Jdev Studio ver 12.1.3.0.0. Please, share your ideas.

    Thank you

    25 is the size of the default range for the iterator.

    Components as selectOneChoice does not support paging so you must set this value-1 (select your iterator pageDef and replace the RangeSize property)

    Dario

  • SSO allows only local users of OS and not?

    We are small: 3 guests with about 40 virtual machines.  I only need a server to do all my stuff vcenter, and that's how I ran through 4.1.

    I intend to do a simple install, during the upgrade to 5.1.  I'd do it rather _not_ deal with Single Sign-On Donostiarra, adding and according to my Active Directory if I can help it.  Reading of the vSphere vCenter Server 5.1 Upgrade Guide ESXi, around 30-31 pages, it appears I can indeed just use SSO with local users and not need to discover AD at all.  Here again, it is not exactly clear to me.

    Here's what he said:

    Page 30-31

    How vCenter Single Sign-On affects vCenter Server upgrades:

    When you upgrade to vCenter Server 5.1, the upgrade process installs vCenter Single Sign On first, then upgrades vCenter Server...

    In vCenter Server 5.1, so vCenter Single Sign-On is... on a computer that is joined to an Active Directory domain, Single Sign-On will automatically discover the existing Active Directory domain and add it as a source of identity for the process of installing Single Sign-On. If the Single Sign-On is not running on a virtual machine or physical machine that is in the same domain as Active Directory, you must use the vSphere Web Client to connect to vCenter Server and add the Active Directory domain to single SignOn.

    If you install vCenter Single Sign-On and vCenter Server on the same physical or virtual computer, Single Sign-On recognizes existing users of local operating system. After the upgrade, you can connect to vCenter Server with a local operating system user ID.

    In vCenter Server 5.1, the term ' OS local users "refers to users the machine host Single Sign-On instead of the host to vCenter Server or virtual machine. After the upgrade, so no super Admin does (the administrative user or group for the root folder), you must provide a valid user or group as a super administrator during installation.

    So I can just be local admin user on my server vCenter Server, install the SSO, then the rest and make?  No need to attach the AD?

    PS: my current vCenter 4.1 server is indeed a member of our AD (Windows Server 2008), but it's mostly just do WSUS and others.  I do not AD require otherwise.

    TL; Dr: Yes your assumption is correct, local users are working with SSO, it is not necessary for users of the AD.

    long version:

    I would still install it as a domain user, if Autodiscover fails, don't bother on this subject. As long as you use install Simple (I rather advise you to install the components one after the other) or install SSO in basic Mode, you will be able to use your local users.

    If you ever decide you need users AD they can always be added at a later stage.

    If you install SSO without using Simple install do not forget to install basic as Multisite mode and Mode HA do not support the local system users.

Maybe you are looking for

  • Need help with the online game

    When I play an online game my ping go very high and it has started a few days ago.I have now what I can do.My internet is good. Can someone help me?Also, mi cant geth my memory higher.It is said: 3.00 GB (2.60 GB avallible) how can I get higher?

  • Windows 7 starts already

    I have problems trying to access a HARD disk. I need to get off and on the external HARD disk, content however, when starting up, the display of the logo on and there are small points; then it crashes. The computer wants to do a repair, but it does n

  • "System.UnauthorizedAccessException" when you run Optika Vision Lite

    I installed optika vision lite software on my computer windows 7 and when I clicked on options to change the language from Spanish to English, he brought this error, please help me I need to use the software as soon as possible Thank you See the end

  • Nexus1000v on Hyper-V, adding a VEM a host has no

    Hi all I have Hyper-V with Wndows server host 2012 R2 installed on it and System Center Virtual Machine Manager R2 2012. I manually installed Nexus1000v VSM. Everything is OK, but when I try to add the virtual switch to a Hyper-V host a get on 2012R2

  • AnyConnect Portal Login - unable to choose connection profiles

    Hello We have an AnyConnect-setup, using several profiles of connection for different clients. However, we have a problem where some of them are not available to choose from on the portal of connection using a web browser. I tested it on IE and Chrom