Back-end test with the user ID

Hello
I would like to test some procedures and functions on the backend for a client application.
The procedures must insert and update functionality and I have a table that contains the value last_updated_by.
This must be the id of the user to make changes.

I have a procedure that returns the user_id:
FUNCTION user_id RETURNS the NUMBER IS
action_name CONSTANT VARCHAR2 (30): = 'USER_ID ';
l_user_id NUMBER;
BEGIN
l_user_id: = htmldb_util.get_user_id (nvl (v ('APP_USER'), USER));

RETURN l_user_id;
EXCEPTION
WHILE OTHERS THEN
RETURN - 1;
User_id END;

This works very well in the APEX application but it returns NULL as I am not connected as a user backend.
For testing purposes are there a way to create a session programmatically that will return a user ID?

Hello

Create a session of the APEX in PL/SQL should solve your problem.
Martin Souza Giffy wrote a great article in which he provides the code necessary to create a session from the APEX of PL/SQL:
http://www.talkapex.com/2012/08/how-to-create-Apex-session-in-plsql.html

Good luck
Nick

Tags: Database

Similar Questions

  • Upgrade to 8.1 fails "you must use an account with administrator privileges to install Windows 8.1." "Try loggin with the user of an administrator on this PC account and try the update again.

    Hello

    I have some difficulties to try to upgrade to windows 8... The computer asked me to go to 8.1, I click OK and it sends me to the store. Then I click on "Download Windows 8.1 Pro" and I get the message:
    "You must use an account with administrator privileges to install Windows 8.1." Try loggin with the user of an administrator on this PC account and retry the update", as shown in the attached picture.

    The thing is that I am the only administrator account.
    I also checked enable the built-in Administrator, by logging in and trying to here, but from the account built-in administrator is not aloud me to use Store.

    What can I do? Thank you

    Original title: upgrade Windows 8 Pro x 64 to Windows 8.1

    Hello

    I've read reports that uninstalling Windows Update KB2871389, and then put it back solves the problem.

    I read recently that this Fix - It might help...

    http://support.Microsoft.com/kb/971058/en-us

  • Tests with concurrent users on HTTP Web load

    Hello

    I'm trying my PHP Web Application load testing.

    I record (with Firefox) and developed the test with OpenScript script,.
    but I found that I could only test with function "Iteration".

    Is it possible to do load tests with concurrent users (connection of users at the same time multi) defined in the database?

    Thanks for help.

    Hello

    You need to load the script in BTA (Oracle Load Testing) you can download it from here , you have the first link Oracle Application Testing Suite and run the OATSxxx.exe to install the BTA.

    Concerning

    Alex

  • You are about to open a session "keiron.me.uk" with the user name "Gerry" site, but the site requires no authentication. Maybe it's attempt to deceive you.

    http://Keiron.me.UK

    This very annoying message what I select my site

    You are about to log on the site "keiron.me.uk" with the user name "Gerry", but the site requires no authentication. Maybe it's attempt to deceive you.

    It is ok with Internet Explorer

    To resolve this problem, simply is to remove all bookmarks you have to keiron.me.uk and then re-create by vising the site by typing the address directly into the address bar.

    If you want to manually fix it then, check the properties of the location of all bookmarks that you have for keiron.me.uk. It is probably similar to http://keiron:[email protected] remove the keiron:password @ section and the dialog box should not appear again.

  • my wifi password has been changed and now I want to get back in touch with the new password HOW

    my wifi password has been changed and now I want to get back in touch with the new password HOW

    Hey gerritfrompretoria,

    If you are not prompted to use the new password to your Wi - Fi network when trying to connect, you may have to remove the network on your system. This can be done by the following steps.

    1. Open system preferences in the Apple menu
    2. Choose the network
    3. Select a Wi - Fi connection on the left
    4. Click Advanced... in the bottom right
    5. Choose your network from the list of preferred networks
    6. Click on the '-' at the bottom of the list
    7. Click OK
    8. Click on apply

    Once removed try to connect to your Wi - Fi network normally and you will be prompted for the password.

    Sincerely

  • I have created a new domain with win2012r2 and created users. Add after the client in my area so that the newspaper with the user I get error below.

    Hello

    I have created a new domain with win2012r2 and created users. Add after the client in my area so that the newspaper with the user I get error below.

    "You cannot connect because the logon method, you use is not allowed on this computer, please, see your ad min for more information network"

    Please help me with that and I don't want to give permission to admin for all users group...

    Hello

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • How to create a user local administrator with the user root on the CV

    As says the tile, how to create a user local administrator with the user root on VCS-Express. I lost the password and cannot log in as an admin user, but I can't seem to log as long as user root.

    Once connect you with the root account, type in "tsh", from there, you can create the accounts of local administrators with 'xCommand AdminAccountAdd.  See the reference section of command of the VCS Administrator's Guide, starting on pg 517.

    If your VCS is a virtual machine, you can change the password of admin with vSphere, or if it is a hardware appliance, you can use the serial port, see pg 312 of the Administrator's guide.

  • When I log in with the user account that reflects on the one hand by car, there is no batch file or a script in AD for this user profile

    Hello

    I created a new user in AD (Server 2003).

    When I connect with the user account that reflects on the one hand by car, it not there no batch file or a script in advertising for this user profile. I don't want user to access this part by car.

    If anyone can help.

    Kind regards

    Virendra Tainya

    Hello Virenda,

    Thanks for posting your query on the Microsoft Community.

    I would like to inform you that we have a support forum dedicated to systems on area issues, I suggest you to send your query on Microsoft TechNet forum for this issue. You can get more effective suggestions and adapted by experts familiar with this topic.

    Please visit the link below to find a community that will support what ask you:

     

    Microsoft TechNet

    https://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?Forum=winservergen

    Hope the helps of information. Let us know if you need help with Windows related issues. We will be happy to help you.

    Thank you

  • I need to download photoshop test with the support of middele is to write in Arabic

    I need to download photoshop test with the support of middele is to write in Arabic

    Hello

    Please see Photo editing software | Download the free trial version Photoshop CC

    Hope that helps!

    Kind regards

    Sheena

  • Failed to connect with the user name "Administrator".

    Hello

    I want to configure vCD in VCO, but I am faced with error. I'm by train through the configuration of the vCO.

    I get the error message https://10.99.133.212:443 , Failed to connect with the user name "Administrator". And the description of the error is: "the API version information could not be obtained for the host https://10.99.133.212:443 () (administrator@System)!'."

    Here are the entries I provide:

    Host: 10.99.133.212

    Organization: System

    Authentication: basic

    Session: shared

    and name of user and password.

    What could be the error here? My vCO has IP 10.99.129.33. And I imported the vCD also SSL certificate.

    Kind regards

    Bethy

    You must first remove the new plug-in...

    VMware KB: Uninstall a plug-in for VMware vCenter Orchestrator

    Remember that you use step 6.3 in this article to delete the contents of the package as well. To verify that the workflow and actions have been removed, check that the following workflow category (and all children of it) no longer exist:

    / Library/vCloud Director

    And all related Action modules should have disappeared as well:

    com.vmware.library.vCloud. *.

    Once you have completed all steps of the KB, install version 5.1 of the plugin, configure and restart the vCenter Orchestrator Server service, once again to complete the installation.

  • How to share proof of publication of dps with the user of the window?

    How to share evidence of a dps publication made on a mac with the user of the window that needs proof it?

    If they are running on Windows 8.1, they install Adobe Content Viewer of the store to see the shared folio. Otherwise, they will need an iOS or Android to see the shared content.

    Neil

  • How can I add a form with the user name and password

    I would like to add a registration form with the user name and password. Are there any embedded html or widget for this

    Hello

    Here you will find a similar description:

    https://forums.Adobe.com/message/6078030

    https://forums.Adobe.com/message/6141887

    Thank you

    Sanjit

  • Failure to logon with the user SYS: ORA-01031: insufficient privileges

    Hello

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 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

    OS: CentOS 5.5

    I can't log in with the user SYS via PL/SQL Developer. I get the message: ORA-01031: insufficient privileges. PL/SQL Developer is installed on Windows 7 Professional. Version of the Oracle Client is 11.2.0.1.0. However, I connect successfully with SYSMAN and SYSTEM.
    For those who may wonder if I try to connect 'as sysdba' when I use the SYS user, the answer is YES, I do.
    In addition, I think that the name of the tool (PL/SQL Developer) does not matter because I think I'm going to face the same error with any other tool (but I mentioned just in case).

    Server side, I have no problem with the SYS user. I can connect via SQLPlus with connect / as sysdba or connect "virtue sysdba" without fault.

    The sec_case_sensitive_logon initialization parameter is set to FALSE
    SQL > show parameter sensi

    VALUE OF TYPE NAME
    ------------------------------------ ----------- ------------------------------
    SEC_CASE_SENSITIVE_LOGON boolean FALSE

    I use the local name to connect and client side, I have a tnanames.ora file. The sqlnet.ora file looks like this:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    I read in this forum (another thread) on the use of a password file. I created a password file using orapwd this way:
    orapwd file=orapwDB11G2 entries=100 ignorecase=y password=a_password
    where I replaced "a_password" with the SYS password.

    In fact, I'm not sure that the customer is influenced by the file password anyway because I said to use a local naming.

    Clues?

    Thank you very much!

    So your ORACLE_SID is planet but not DB11G2 , second password file must be located in $ORACLE_HOME/dbs location if you want to connect the planet of database/sid and therefore

    orapwd file= $ORACLE_HOME/dbs/orapwplanet password=syspass
    

    Then try again.

  • Opening a session with the user not admin

    Hi all

    I get this error when I connect with the user not admin.

    "Application is in maintenance mode, new connections are not allowed."

    No idea about this will be really helpful.

    You must identify yourself with the admin user and exit maintenance mode, the steps are here:-http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/ch10s02s05.html

    That could post even though the steps are sometimes people find a bond far too difficult.

    Select Administration, Application and settings.
    For the show, select Advanced settings.
    Click OK.
    Select system settings.
    Application in Maintenance mode, select an option to allow use of the Application to:

    All users: all users can log in or continue working with the application.
    Administrator: Only administrators can log on. Other users are driven out and prevented to connect until the option is given to all users.
    Owner: Only the owner of the application can connect. All other users are unable to open a session. If they are currently logged in, they are forced from the system until the option is given to all users or administrators. Only the owner of the application can restrict administrators to use the application.

    If your selection is more restrictive than the current setting, click OK.
    Click Save.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Interact with the user interface components

    I'm trying to find a GOOD way to interact with the external classes user interface components. For example, that you have a 'controller' class that needs to access the view of the user interface in some way (define a label text or something else). The controller class does not do anything, it discusses only the logic of what should be the case. Currently, it is created by my top-level class when the program starts. He listens to some events occur and needs to update/interact with the user interface or the State of the application depending on what events are. I do not seem to be a way for this controller class to easily access the UI component that I need to get my hands on.

    I'm trying to do to reduce the size of a file of mxml WindowedApplication growing (LOOK cool but that is not important) and take part of the logic of the application of this file.

    It's complicated by the fact that the label is in a State that does not have the status of 'base' (so it is not a child, or even a subsidiary child of the main class at boot time) and by the fact that it is not yet near a high school component. (If that were the case, I could probably just pass the label object in the constructor for the outdoor classroom.)

    In other words, I can't just call getChild ("labelName") on my 'main' request object because it is buried nested inside OTHER components. I don't think I like the idea to browse all components and sous-composants recursively looking for the component that my outer class trying to ask. I thought about other ideas, but I don't like any of them enough to try them, eh.

    I'm at the point now about where I come to the conclusion that my fundamental design strategy is wrong, or Flex just not allowing complex applications where the GUI components can interact with external classes relatively pain-free. I'm not convinced that "Flex cannot do', I'm looking for advice on some great Flex application in all design patterns.

    Where do you put this kind of control logic, and what happens when it starts to overflow and become so large that you need to break in other files?

    Found a solution, I think that's what I've been looking for:

    http://labs.Adobe.com/wiki/index.php/Cairngorm

Maybe you are looking for

  • How do we install start page that has blocks of preference/history on this?

    I try to install the firefox start page that has blocked on that and I'm not. This is the start page with firefox preferences that you can modify. There are 6-8 places at the top and at the bottom of the page with the proposed Web sites...

  • 750 - 140z envy: envy 750-140z is compatible with AMD RX 480?

    Envy - what is compatible with AMD RX 480 750-140z? I guess I should also upgrade the PSU?

  • Qosmio F10: ERROR: ' unable to ACPI namespace!

    The original motherboard with 855 PM chipset, with was exchanged to Toshiba German service during the warranty period for the new with a different chipset (915 or 910). The Toshiba "Common Modules" were running successfully with the new motherboard u

  • Vision in real time with USB2?

    Hey guys,. I'm stuck to decide on a method of image acquisition. My project requires real-time imaging, but it is on a netbook, except that USB is out. Ethernet is only 100mbit so no gige. I tried a few Comsumer s level USB cameras that I slept here

  • No text, all the characters/fonts gone

    Hello. My SanDisk Sansa Clip Zip MP3-Player works except that suddenly it shows not all test. For example, it shows the 'Settings' icon, but he has not written 'settings' below. I don't see where it says 'artists' or the names of artists or anything