Get the database name

Hello

I use JDev 11.1.1.4.0.

A requirement for me is to send the notification by e-mail to a group of users. While composing a message, precede the object with the name of the database. For example, if the message carries on a new employee is added, the topic should read as follows:

"HR: new employee has been added.

Is there a way to get the name of DB without running the SQL "SELECT ORA_DATABASE_NAME FROM DUAL"?
If not, should I create a new VO just for that?

Thank you

Joonsup

Hello

you create a public method in the AM Impl class and expose it as a client method. Then use the code below

    public String getDatabaseInformation(){

        DBTransaction dbTransaction = (DBTransaction) this.getTransaction();
        PreparedStatement prepStatement = dbTransaction.createPreparedStatement("select * from dual", 0);
        try {

          String dbSchema = prepStatement.getConnection().getMetaData().getUserName();
          String connectURL = prepStatement.getConnection().getMetaData().getURL();

          //returns schema_name@host:port:sid
          return dbSchema + connectURL.substring(connectURL.indexOf("@")-1);

        } catch (SQLException e) {
            e.printStackTrace();
        }
      return null;
    }

In this way information is accessible from the web client and the BC ADF model itself

Frank

Published by: Frank Nimphius on August 2, 2011 17:02

Tags: Java

Similar Questions

  • How to get the database name/IP address of the server forms10g database

    Hello world
    How can I get the name of the database instance and the IP address of the database server?

    I use GEC 10 g and the database server is Oracle 10 g.

    Dobbelaere

    How can I get the name of the database instance and the IP address of the database server?

    To use the IP UTL_INADDR

    For example name you can use sys_context ('userenv', 'instance_name')
    or
    SQL > select instance_name from v$ instance;

  • How can I get the user name (the user who has registered their own personalized interactive report) in the application

    Hello

    I want to get the user name. Who saved their own custom application of the Apex report.

    If someone could please help to get user names.

    Thanks in advance.

    Kind regards

    Cyril S

    A possible source: see in the following metadata table: apex_application_page_Ir_rpt

    You will need the id of the application, the page id and the id of the report to the information, which is located in the application_user column...

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • [MAF] How to get the user name and password after login?

    Hi Experts,

    I have a call to REST where it requires identification information of the user (uname and password) to identify the data that belongs to who.

    Authentication has been made with OAuth.

    I believe that there is an API to get the user name and password in the CRG

    See you soon,.

    Hendry

    Hello.

    You don't need to manipulate the credentials yourself in code. MAF will propagate the logon cookie or inject the identification information in the HTTP header if cookies are not supported.

    To do this, you must select the purchase option of cookie from the server connection Include in REST in the dialog box create a connection Login MAF , such as discussed here:

    http://docs.Oracle.com/middleware/maf210/mobile/develop/MAF-securing.htm#ADFMF23732

    In addition, you must attach the policy of security appropriate to the connection, as explained here:

    http://docs.Oracle.com/middleware/maf210/mobile/develop/MAF-Web-services.htm#ADFMF23697

    Best regards

    Frédéric Desbiens

    Senior Product Manager

    Mobility and Cloud oracle

    Twitter: @BlueberryCoder

    blog: http://blogs.oracle.com/blueberry

  • How to get the full name of the user of the OPS?

    Hi Experts,

    I know we can get the login controller pageContext.getUserName () user name. Is there a simple way/API to get the full name of the user (name, first name) of the OPS?

    Thank you.

    Hello

    USER name and information of the PERSON are two different concepts. You can get the id of user with pageContext.getUserId () connection. In order to get the first name, last name, you must select it from table PER_ALL_PEOPLE_F.

    You can use the sql select and set pUserId of pageContext.getUserId ();

    SELECT FIRST_NAME, LAST_NAME TO PAP PER_ALL_PEOPLE_F, FND_USER FU

    WHEN TRUNC (SYSDATE) BETWEEN PAP. EFFECTIVE_START_DATE AND PAP. EFFECTIVE_END_DATE

    AND FU. EMPLOYEE_ID = PAP. PERSON_ID

    AND FU. User_id =: pUserId

    Anil

  • How can I get the file name of a report, I have just stored in the cache

    I would like to be able to get the file name of the report that is stored in the cache directory.

    When a report is created from forms to help

    SET_REPORT_OBJECT_PROPERTY (v_report_id, report_desname, 'fubar.pdf');

    In the cache directory a file is created something like fubarABC123DE.pdf. I guess that part of ABC123DE is the cache key.

    I want to be able to read this file from another process. This process cannot use http, so I can't pass the URL. However, I would still be able to access by using the URL.

    Is all the same to get at the file name?

    The answer is, according to management, you can get the name of the file in the cache, so if you want to access the file you need to store somewhere else.

  • How to get the user name during the execution of a workflow?

    Here's what I would do:

    Say that each user is allowed to have 4 instances QA, create a workflow when a user run from vCenter plugin, it must be able to get the user name of the SSO user jsmith, and then he questions if there is an existing virtual machine jsmith_qa1, jsmith_qa2,jsmith_qa4, etc., if there isn't one, then create one for him; If not, indicate to the user that there are already 4 cases.

    I found that I can use getCurrentLdapUser to get [email protected] , now I want to remove the domain.name (there are several areas):

    username = actionResult.userPrincipalName.replace ("@[a - z].") +","");

    This does not work. Anyone know where I can find the right document for the document script of vRealize Orchestrator?

    Thank you!

    Jack

    vRO uses javascript as its scripting engine.

    UPN var = actionResult.userPrincipalName;

    var username = upn.substring (0, upn.indexOf("@"));

    Something like this will give what you want. You could also do a replacement, but I think that you should remove the quotes around the regex and use "/" instead.

    username = actionResult.userPrincipalName.replace (/ @[a - z] "+ /," "");

    Paul

  • How to get the host name of the physical computer inside a virtual machine until the user logs in Windows?

    I don't know if this is the right place to post this question, I develop software to support VMWare PCoIP and need to know how to get the host name of the physical machine (which manages the virtual machine and View Client) within a virtual machine before the user logs in Windows of the virtual machine.

    I understand there are two ways to read the host name, via the HKEY_CURRENT_USER\Volatile Environment registry and environment variables, but they are available once the user is connected. I need info before the user connects.

    Is there a VMware API that can be called or asked the host name?

    Thank you.

    Not on the broker, but there are the startup scripts to log on to the computer virtual itself: http://pubs.vmware.com/view-52/topic/com.vmware.view.integration.doc/view_integration_startsession_script.9.2.html

    Note that these executed when a virtual desktop computer allocated connection, not to the point that the client connects - it is possible for the customer to not complete the connection (crash, cancel, network failure) and so any what solution you design must handle this.

    Mike

  • Get the user name of the user of the system

    Hello world

    I am new to adobe flash. How can I get the user name of the user of system and display on the flash application.

    I would also like to know if it is possible to import libraries that are on Adobe air apps in Adobe flash.

    Thank you very much

    you have very little access to information on the system and no access to system user.  check the class features to see the available information.

  • How to get the role name of the OIM 11 g using the API

    Hello
    I have a scenario in which I create role/group of OIM 11 g & she gets supplied with AD [= works great] & other party it is when I remove role in OIM 11 g then it should
    removed from the AD. I wrote the postprocess event handler to achieve this goal.
    In the authoring part of role I get all the parameters by using "orchestration.getParameters ()"; but when I delete the role then "orchestration.getParameters ();" is empty, so I'm
    Unable to get the name of the role.
    Is there a way to get the role name when you remove roles by using the API?

    Thank you
    Rahul Shah

    Hello

    To implement using pre-wet the handler rather post-processing.

    Kind regards
    Ralu

  • Lets get the user name in the workspace of BPM ADF Managed Bean

    Hi all

    I used JSF, and ADF to build the user interface for the task. And I want to get the user name of the user who is handling on workspace of BPM. For example, an ADF form may display the username of the current user in the workspace of BPM. I also try this approach: use handle Bean and bind this bean to a text output in the form of the ADF. The code fragment that I use to get the current user name is:
    ADFContext.getCurrent () .getSecurityContext () .getUserPrincipal () .getName ();

    But it does not work. The value I get is anonymous.

    So, please help me solve this problem

    Hello, please try this feature as below:

    public String getUserLogin() get WorkflowException,
    BPMIdentityException,
    {BPMUnsupportedAttributeException}
    String userId = "";
    IWorkflowServiceClient wfSvcClient;
    ITaskQueryService queryService.
    IWorkflowContext wfContext;

    Get the username of the user login
    String contextStr = ADFWorklistBeanUtil.getWorklistContextId ();
    wfSvcClient = WorkflowService.getWorkflowServiceClient ();
    queryService = wfSvcClient.getTaskQueryService ();
    wfContext = queryService.getWorkflowContext (contextStr);
    userId = wfContext.getUser ();

    Returns the user name;
    }

    Kind regards.

  • Get the current name of the page without the aid of a bean

    Hello, everyone!

    If I would get the current name of the page to a page, I'd do something like this:
    #{bean.currentPageName}
    @SessionScoped
    @Named
    public class Bean
    {
        public String getCurrentPageName()
        {
            return FacesContext.getCurrentInstance().getViewRoot().getViewId();
        }
    }
    But my question is: is it possible to get the name of the current page directly from the xhtml page without using a bean? Is it something related to it or information available to the page itself? If so, how can I access it?

    Thank you in advance.

    Marcos

    Use the same semantics in the page:

    #{facesContext.viewRoot.viewId}
    
  • get the project name to use in a procedure?

    How to get the project name to use in a procedure?
    example of < % = odiRef.getOption ("COMPATIBLE") % > - but the name of the project or your ID?
    the 11 ODI.
    Thank you

    Published by: ODI Dev user on 12/01/2010 16:42

    Hello

    Why you want to get the name of the project? When you place a repository of development to a repository of execution, where there is no concept of projects, what value do you offer you to get?

    BOS

  • How to get the file name of the current active document in InDesign CS4?

    Hello

    If I open a document in the file-> open, I can get the file name of the document using IOpenedFileInfo-> GetOpenedFilePath().

    But, if I create a new document and run the file-> save as, GetOpenedFilePath is invalid back reference IdFichier.

    What is the right way to get the file name of the active document?

    Thank you

    VSP

    You can try this:

    IDatabse * db =: GetDatabase (theDoc);

    IdFichier * SYSIXCOL = db-> GetSysFile();

    PMString docName is SYSIXCOL-> GetFileName();.

    Good luck

  • Get the user name in the select LOV

    Hello!

    I wonder if its possible to get the user name of the currently logged in user and pass it as a variable in a select statement used in a dynamic LOV in Oracle AS Portal?

    What I'm trying to do is pull all values in a table that corresponds to the current name of user to user on a portal report

    (as an approximate example)

    Select the color from mytable where username = 'whatever is the user name would be here. "

    And then the current user would get a list of values to select based on the values entered in this table.

    The issue I'm having is determine how to complete part "regardless of the user name is would be here" with the actual recorded in user name (or even if its possible). I know that on the portal, we can do #USER. FULLNAME # to display their username, is there a similar "variable", can be used to get the user name for a call to sql LOV?

    I can make it work if I statically resolve the user name to a particular value (ex: where username = "Joe.Hacker"), but I'm not sure if theres value a variable or a bind (for lack of better term) to enter the name of the user on the fly... dynamically.

    Portal.wwctx_api.get_User can be used in your report of Portal SQL query to get the user_name of the currently connected user portal. For more information about wwctx_api, see 10.1.2 portal API documentation or 10.1.4 at http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1012/index.html or http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc1014/index.html

Maybe you are looking for

  • Share icon has no option of mail

    Updated at El Capitan over the weekend.  I've been uploading photos to a digital frame by electronic mail and 'Share' icon no longer has the e-mail option.  Any suggestions?

  • Voice track recorded with the live truck camera

    We will use Final Cut X soon in our direct trucks. We use the camera and microphone for voice of reporter for the parcel track. What is the best way to get audio only to drop it on the timeline?

  • Cannot use the Terminal

    Hello I tried to uninstall a version of Java and got the instructions how to do the site of Java.  They said to sign as an administrator, click Terminal Server in public services and enter the 2 lines of command starting with sudo, but 1) when I get

  • HP T610 more: HPDM deployment for t610 image more crashes during the installation of the new initial start of the image

    We are working on the update of our thin clients HP T610 more.  Update us the thin clients in the last image of the OS WES7P and also update to IE11 and Citrix receiver 4.4. We use HPDM 4.6.4 We have successfully several T610s and update the image of

  • HP laptop computer 2000 PC: USB Port

    Hi, have questions about the USB ports on my laptop HP 2000. I know when I put my laptop into hibernation mode turns off USB ports. But reaction place my laptop mode 'sleep', in my opinion, the USB ports are still functional. My question is the USB p