Try to get the login user name in the field of database

I have an Apex application with 4 tables. Each table has its individual fields more audit 4 fields (CR_DATE, CR_USER, LM_DATE, LM_USER) to follow, create and edit events Records.
We use authentication database for the application of the Apex, each user has his own connection to the database ID.

Our standard development efforts resulted in a practically useless 'APEX_PUBLIC_USER' entry in our areas of audit.
Manual change of our triggers (by Toad) solved this problem. However, a business rule States that all the requirements of design of database are stored in Oracle Designer and manual trigger changes are not an option for us.

So, we have posted on the forum of designer asking a way to make this change in the designer
link:Re: manual trigger changes are not retained when the API is generated (re)

I made the suggested changes and were able to verify that these changes work if I change records using Toad, but don't work not by Apex. It seems that I have the login name used by the server instead.
(for example if I connect on the toad as a generic user and edit a record, my personal user name appears correctly in the field of the LM_USER - if I change a record through the Apex, connected applicaton as myself, the area of the LM_USER says 'oracle')

I tried to change the source of the LM_USER field in the Apex to pull the value of APP_USER, but it seems to be crushed (or substitute) by the triggering action.

The goal is to have the usable information audit trail field on the user who performed an action, if possible based on the: value APP_USER in Apex, which is also the oracle username.

Hello:

You might want to reference "CLIENT_INFO" rather than "OS_OUSER" in the trigger, code generation and check if it helps. APEX defines CLIENT_INFO APP_USER for each database request.

CASE
   when  SYS_CONTEXT('USERENV','CLIENT_INFO') is null then
       cg$rec.CREATED_BY
   else
     SYS_CONTEXT('USERENV','CLIENT_INFO')
END

CITY

Tags: Database

Similar Questions

  • How to get disabled login user (without password) at startup, so NOT to SHOW at all and so after the switch, go to desktop directly

    Vista Ultimate 64-bit

    How to get disabled login user (without password) at startup, so NOT to SHOW it to all (and needed clicked) and so after the switch, go to desktop directly?

    Also after inactivity, how to not go to sleep mode and press "power on" to bring back?

    Hello

    If you want to start directly on the desktop?

    How to automatically connect at startup in Vista
    http://www.Vistax64.com/tutorials/66966-logon-automatically.html

    Or

    How to make Vista require a user name and password when connecting
    http://www.Vistax64.com/tutorials/89812-logon-username-password.html

    =========================================

    Start - Control Panel - Power Options - upper left - require a password on wake up
    tick her do not require a password - save the changes.

    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • How to get current Login user in Oracle Forms?

    Hi friends...

    How to get current Login user in Oracle Forms?

    using the PL/SQL Editor on triggers.

    Please tell me...

    You have plsql function USER.

    For example:

    CURRENT_USER: = USER;

    Concerning

  • How to down load update13.1?  Wen I try I get the error Code: U44M1I210.

    How to down load update13.1?  Wen I try I get the error Code: U44M1I210. I am now dtuck in a circle.  Each timi I stard Photoshop elements, it goes to the update screen.  I just bought today.

    You do not do so in EPS, you create the new user on your computer, and then start PSE while signed in as a user. You use windows or a mac?

  • Rewrite the query, select below or try to get the necessary O/P

    Hello..

    My example of data.,.

    Create table customer (name varchar2 (10), telephone1 telephone2 number (10), number of phone3 (10), (10) number, bitwisephone number (10));

    Insert into customer values('a',23456,67890,null,12345);

    Insert into customer values ('b', 67459,89760,null, 37689);

    create table do_not_call (dont_call number (10));

    insert into do_not_call values (67890);

    insert into do_not_call values (37689);

    Question: -.
    --------------

    Customer 'a' has value of numbers1 as 23456.check if telephone1 exists in the do_not_call table.
    In fact there is no, so set the bit for numbers1 as "o" like wise search telephone2
    & phone3.after update of the bitwisephone for each client should be as the output below.


    Need to O/P: -.
    -------------------

    name bitwisephone

    a 010
    b 001


    For that matter... I use "any" operator...



    SELECT name, case when numbers1 = all (SELECT dont_call FROM do_not_call) and then put an end to '1' other '0'.
    -case when telephone2 = all (SELECT dont_call FROM do_not_call) and then put an end to '1' other '0'.
    -case when phone3 = all (SELECT dont_call FROM do_not_call) then '1' other '0' end 'Bits '.
    OF THE customer;


    Is there any other way to get the necessary O/P?


    Thank you!!

    Kind regards
    VijayRajaram.

    Looks like one already answered Re: rewrite the query, select below or try to get the necessary O/P

    with
    customer(name,phone1,phone2,phone3,bitwisephone) as
    (select 'a',23456,67890,12345,null from dual union all
     select 'b',67459,89760,37689,null from dual
    ),
    do_not_call(dont_call) as
    (select 67890 from dual union all
     select 23456 from dual union all
     select 37689 from dual
    )
    select name,
           to_char(mod(trunc(sum(weight)/4),2))||
           to_char(mod(trunc(sum(weight)/2),2))||
           to_char(mod(sum(weight),2)) bitwisephone
      from (select name,phone1 phone,4 weight
              from customer
            union all
            select name,phone2,2
              from customer
            union all
            select name,phone3,1
              from customer
           ) c,
           do_not_call d
     where c.phone = d.dont_call(+)
       and d.dont_call is not null
     group by name
    

    Please do not duplicate messages

    Concerning

    Etbin

  • Try to get the code, but it says device saved

    Try to get the code in order to register and get additional codes to pay for services and it says that my drive is already registered. How to fix this? I have not had this code yet. Œuvres of Netflix, but it shows an instant queue of course someone else or gratis. I do not know. Someone help here?

    This a good site thank you never one for all the beautiful work fixed that I'm just getting started

  • I get the message "Could not authenticate you" when I try to get the portfolio management

    Original title: portfolio in MSN Money management.

    I get the message "Could not authenticate you" when I try to get the portfolio management and when I try again, the same message is repeated.  What type of authentication is necessary?

    Hello

    I recommend you contact the support team of MSN Money for assistance on this issue.

    http://social.Microsoft.com/forums/en-HK/money/threads

    See also Solution Center-silver

  • When I try I get the windows update error number: 0x8024400A

    When I try I get the windows update error number: 0x8024400A

    Hello


    This problem is limited to a particular update or all updates? Thanks for mentioning the number of KB.
     

    Follow the suggestions below for a possible solution:
     
    Method 1
    I suggest you consult the site mentioned below:
    Temporary connection related errors may occur when you use Windows Update or Microsoft Update
    http://support.microsoft.com/kb/836941.
    Important note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.
     
     
    Method 2
    If the problem is not solve I suggest you try the procedure described in the link mentioned below.
    You cannot install some programs or updates
    http://support.Microsoft.com/kb/822798
    WARNING: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:
    How to back up and restore the registry in Windows
    http://support.Microsoft.com/kb/322756/
     
     
    Let us know the status of the issue.
  • When I try and get the Microsoft Messaging support, he asks me a 20 digit number. When I enter this number, he told me that he is not registered in the country I've selected.

    I have Dell XPS M1330 with windows vista home premium. When I try to get the support of e-mail on the microsoft support site, he asked 20-digit PID number, when I entered that number, it says this PID is not saved in the chosen country, I m from India, I chose India-English. I also tried in the United States, United Kingdom, but whenever he says the same thing. I can't support for the supplied windows pre-loaded with my laptop. I ve the product key and PID number. Pls guide me to do this, my windows is enabled.

    original title: Support of Windows problem

    Reference Dell are responsible for their OEM of Windows versions. Microsoft supports the commercial versions of Windows. I'm not familiar with the details of the software support arrangements, but it is the basis that applies.

    What is the problem?

  • I have a HP computer and I try to get the best performance on it

    Dear community,

    I have a HP computer and I try to get the best performance on it, but it does not work. I try to update the drivers and use the memory of storge on USB keys and other stuff like using Microsoft Security Essenticals it is sort of: wered because there is no no way around my problem that way happens to you guys, please I want to just play and have the best performance that I can handle it.

    I think I'll put my memory to 8 GB of Ram or 16 GB of Ram.

    Thanks for your help.

    Original title: Windows 7 HP 2000-369WM

    Hello

    Before upgrade you your RAM, check at HP for the specifications of your computer to see what max amount and type of RAM your motherboard will / can use, or download and run the Crucial Scanner:

    http://www.crucial.com/USA/en/systemscanner

    Also, if you use Windows 7 32 bit, 4GBs is the maximum RAM that can be installed, with the exception of Starter which is 2GBs.

    If you are using Windows 7 64 bit, what are the limits of RAM max for each edition (there is no Starter 64 bit)

    http://Acer.custhelp.com/app/answers/detail/A_ID/2729/~/what-is-the-maximum-amount-of-RAM-memory-supported-by-Windows-7%3F

    Home Basic 8GB
    Home Premium 16GB
    Professional 192GO
    Enterprise 192GO
    Ultimate 192GO

    _________________________________

    And follow these steps to keep your device works properly:

    Search for malicious software with the FREE version of this program.

    This is the right link to download included.

    And does not accept the option "Pay for the version" trial installation

    Download, install, update and scan your system with the free version of Malwarebytes AntiMalware:

    http://www.Malwarebytes.org/products/malwarebytes_free

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    You can clean your hard drive using these two methods.

    "Delete files using Disk Cleanup"

    http://Windows.Microsoft.com/en-us/Windows/delete-files-using-disk-cleanup#delete-files-using-disk-cleanup=Windows-7

    Using the free CCleaner program:

    http://www.Piriform.com/CCleaner

    In NO case use the registry cleaning Option in CCleaner

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    And it is not recommended to use a register or a program of cleaning/TuneUP/utilities they can do more harm to your any good operating system that they claim to be able to do.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    Make sure you have the latest updated drivers:

    Access the site on your computer or equipment manufacturing > Driver and Software Support Section > search your computer or hardware model number > then your operating system > locate the correct drivers > download and install.

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    What are the other steps, which does not include some of the above:

    "Optimize Windows for better performance.

    http://Windows.Microsoft.com/en-us/Windows/optimize-Windows-better-performance#optimize-Windows-better-performance=Windows-7

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    It would be a good idea also run the System File Checker tool to check that everything is correct in the system files.

    "How to use the System File Checker tool to fix the files on system missing or corrupted on Windows Vista or Windows 7"

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

    Use the (SFC.exe) System File Checker tool to determine which file is causing the problem and then replace the file. To do this, follow these steps:

    1. Open an elevated command prompt. To do this, click Start, click principally made programs, Accessories, right-click guest, and then click run as administrator. If you are prompted for an administrator password or a confirmation, type the password, or click allow.
    2. Type the following command and press ENTER:
      sfc/scannow

      The sfc/scannow command analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    See you soon.

  • Try to get the old software to work on Windows 7

    I am trying to run old software on my Windows 7 PC. It's a language program that was given to me recently. When I insert the disc and try to run the program I get the following error message. "the version of this file is not compatible with the version of Windows you are using. Check your computer's system information to see if you need a x 86 (32 bit) or x 64 (64-bit) version of the program and then contact the software publisher. "Then I tried to run the program in compatibility mode with the two 95, 98, 2000 and Windows XP however whenever I test with one of these compatibilities nothing happens. Then once I have troubleshoot it tells me I have a question that is "Application Incompatible." Is there anything else I can try to get the program to work?

    Hello

    If you have Windows 7 Professional or ultimate, you can try XP mode...

    http://www.Microsoft.com/Windows/Virtual-PC/

    Tricky

  • CS6 Photoshop Camera Raw 7.1 Installation failed. Error code: U44M2P7 - try to get the Camera Raw Filter for Photoshop CS6

    CS6 Photoshop Camera Raw 7.1 Installation failed. Error code: U44M2P7 - try to get the Camera Raw Filter for Photoshop CS6

    U44... Update error http://forums.adobe.com/thread/1289956 can help

    Try to install your updates manually

    Beginning of the updates here and product selection, read to see if you need to install updates in the order of the numbers, or if updates are cumulative for the product http://www.adobe.com/downloads/updates/

  • I have subscription for adobe cc and when I try to get the first he comes up with an unusable version of first cs6 for some reason, I can't change it, please help me

    I have subscription for adobe cc and when I try to get the first he comes up with an unusable version of first cs6 for some reason, I can't change it, please help me

    Your system meets the criteria for more recent versions of first?

    Premiere Pro - http://helpx.adobe.com/premiere-pro/system-requirements.html

  • Try to get the slide show gadget extend in the background as a banner or a footer, can someone help me with this?

    Try to get the slide show gadget extend in the background as a banner or a footer, can someone help me with this?

    You can use the full width slide show on master so it would show in the background of the page.

    Thank you

    Sanjit

  • Hi all, I'm haing adding items to my folio. When I try, I get the message ".

    Hi all

    I'm haing articles adding my folio. When I try, I get the message "Network failure." No idea what to do?

    There are known server problems. You can check the status here:

    http://status.adobedps.com/

  • Try to get the listener to the APEX to run in stand-alone mode

    US aircraft problems try to get the APEX listener running in stand-alone mode on AIX, but that did not work. We decided to switch to Linux, and now we get questions below on the Linux (Red Hat). Any ideas?

    Thank you!

    Java $ [oracle@ban-apex-prod apex_listener]-Dapex.port=8070-Dapex.images=/home/orale/apex/images-jar apex.war
    NEWS: Check out: /home/oracle/apex_listener/apex.war
    See: ' java-jar apex.war - help' for a full range of configuration options
    INFO: Extraction to: / tmp/apex
    INFO: Using classpath: file:/tmp/apex/apex/___embedded/start.jar:file:/tmp/apex/apex/WEB-INF/lib/xdb-1 1.2.0.jar:file:/tmp/apex/apex/WEB-INF/lib/poi-3.6-20091214.jar:file:/tmp/apex/apex/WEB-INF/lib/apex.jar: file:/tmp/apex/apex/WEB-INF/lib/ojdbc6.jar:file:/tmp/apex/apex/WEB-INF/lib/je-4.0.103.jar:file:/tmp/ap ex/apex/WEB-INF/lib/xmlparserv2-11.2.0.jar:file:/tmp/apex/apex/WEB-INF/lib/ojmisc.jar : file:/tmp/apex/ap ex/WEB-INF/lib/ucp.jar:file:/tmp/apex/apex/WEB-INF/lib/commons-fileupload-1.2.1.jar:
    INFO: From Embedded Web container: / tmp/apex
    December 7, 2011 16:36:55 ___bootstrap. The Deployment Manager deploy
    INFO: Deploy application path=/tmp/apex/apex/WEB-INF/web.xml
    December 7, 2011 16:36:56 ___bootstrap. The Deployment Manager deploy
    NEWS: deployment application path=/tmp/apex/apex/WEB-INF/web.xml
    December 7, 2011 16:36:56 com.sun.grizzly.Controller logVersion
    INFO: From Grizzly Framework 1.9.18 - o - Wed Dec 07 16:36:56 EAST 2011
    INFO: http://localhost:8070 / apex began.
    December 7, 2011 16:37:02 com.sun.grizzly.http.servlet.ServletAdapter doService
    SEVERE: service exception:
    java.lang.IllegalStateException: not yet initialized
    at oracle.dbtools.apex.config.ApexConfig.notInitialized(ApexConfig.java:249)
    at oracle.dbtools.apex.config.ApexConfig.getFile(ApexConfig.java:234)
    at oracle.dbtools.apex.config.ApexConfig.exists(ApexConfig.java:63)
    at oracle.dbtools.apex.admin.AdminManager.populateAdminFieldValues(AdminManager.java:868)
    at oracle.dbtools.apex.admin.AdminManager.getFieldMaps(AdminManager.java:841)
    at oracle.dbtools.apex.admin.Admin.displayAdminHTML(Admin.java:164)
    at oracle.dbtools.apex.admin.Admin.displayAdminPage(Admin.java:147)
    at oracle.dbtools.apex.admin.Admin.doGet(Admin.java:50)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
    at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
    at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
    to ___bootstrap. SecureServletAdapter.doService (SecureServletAdapter.java:72)
    at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:180)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    to com.sun.grizzly.util.AbstractThreadPool$ Worker.doWork (AbstractThreadPool.java:330)
    to com.sun.grizzly.util.AbstractThreadPool$ Worker.run (AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:679)


    December 7, 2011 16:58:39 com.sun.grizzly.http.servlet.ServletAdapter doService
    SEVERE: service exception:
    oracle.dbtools.rt.service.ServiceLocatorException: there is no defined service
    at oracle.dbtools.rt.service.ServiceLocator.acquireAll(ServiceLocator.java:91)
    at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:74)
    at oracle.dbtools.rt.service.ServiceLocator.acquire(ServiceLocator.java:85)
    at oracle.dbtools.rt.web.HttpEndpointBase.dispatchers(HttpEndpointBase.java:138)
    at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sun.grizzly.http.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:195)
    at com.sun.grizzly.http.servlet.FilterChainImpl.invokeFilterChain(FilterChainImpl.java:139)
    at com.sun.grizzly.http.servlet.ServletAdapter.doService(ServletAdapter.java:376)
    to ___bootstrap. SecureServletAdapter.doService (SecureServletAdapter.java:72)
    at com.sun.grizzly.http.servlet.ServletAdapter.service(ServletAdapter.java:324)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapterChain.service(GrizzlyAdapterChain.java:180)
    at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
    to com.sun.grizzly.util.AbstractThreadPool$ Worker.doWork (AbstractThreadPool.java:330)
    to com.sun.grizzly.util.AbstractThreadPool$ Worker.run (AbstractThreadPool.java:309)
    at java.lang.Thread.run(Thread.java:679)

    Hello

    US aircraft problems try to get the APEX listener running in stand-alone mode on AIX, but that did not work.

    Now, it's a coincidence - Colm just posted on this topic today: {: identifier of the thread = 2318817}
    It is in any case, he started on Linux, so...

    SEVERE: service exception:
    java.lang.IllegalStateException: not yet initialized

    This is the relevant part of your stack trace. You must call http://: 8070/apex/listenerConfigure and complete the initial configuration (mainly the database connection settings) before you can access the APEX for the first time.

    -Udo

Maybe you are looking for

  • Pavilion: password administrator or power on password hp Pavilion

    I forgot my administrator password and after three attepms now, it gave me the code 75694080 Help, please.

  • Bluetooth and USB

    The mini connector ubs on the Tablet is so exclusive sony? Also if you buy a bluetooth keyboard that is compatible android or android-compatible mouse bluetooh, will they work?Thank you

  • Query a database - connection duplicated error.

    I use the following to select data in my database: QVariantList Database::queryDatabase(const QString query) { QVariantList sqlData; SqlDataAccess sqlDataAccess(mDbNameWithPath); sqlData.clear(); sqlData = sqlDataAccess.execute(query).value(); if (sq

  • Snapshot report - generates an output of white

    Hi allI hope someone can help me with a script PowerCLI for snapshot report that can extract the report to a csv file.After you run the script to schedule tasks/power Cli both, it generates an empty output in csv.$vcenters = "Test91.EA.com".{foreach

  • Move-VM in the blue folder that exists in several places

    So I have a problem here that I'm not sure if they can even be sorted.Put in a new machine virtual transfer system.  Several data centers & clusters and want the ability to automate move a virtual machine newly created to a blue folder.  The blue fol