Getting LDAP server name?

How can I find the LDAP server name and port?
I presume that the first 2 values are LDAP server name and port?
InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx("host", "port", "orcladmin", "pwd");
Please help.
Thanks

Logon to Portal schema and run the below query:
select wwsec_oid.get_oid_host "LDAP Host",wwsec_oid.get_oid_port "LDAP Port" from dual;

Similar Messages

  • Finding LDAP server names by DNS lookup.

    Hi,
    I'm very new with JNDI and DNS
    We are hardcoding the ldap server name in our configuration to connect to the Active directory, but the requirement is to know the ldap server name dynmaically by querying the DNS server.
    The input given to us are below.
    Dns domain : indbank.is.
    SRV RRecord : ldap.tcp.
    Query dns : ldap.tcp.indbank.is.
    The domain controller should be found by a DNS lookup for the domain, then a DNS for Domain controllers that advertise the service, then try to see if the domain controllers areanswering, and if so choose the one with the fastest answer time (to avoid choosing a domain controller over WAN).
    Kindly help me.I am beginner and some code sample and tip will be welcome. :)
    Thanks in advance.
    Hiubert

    Thanks a lot to All.
    My code is as follows...
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.*;
    public class dns1
         public static void main(String[] args)     {
              try {
                   Hashtable env = new Hashtable();
                   env.put("java.naming.factory.initial","com.sun.jndi.dns.DnsContextFactory");
                   env.put("java.naming.provider.url", "dns://indbank.is");
                   DirContext ctx = new InitialDirContext(env);
                   System.out.println("Intial context created...");
                   Attributes attrs = ctx.getAttributes("_ldap._tcp.indbank.is",new String[] {"SRV"});
                   System.out.println("Attributes are been retrieved...");
                   for (NamingEnumeration ae = attrs.getAll();ae.hasMoreElements();)
                        Attribute attr = (Attribute)ae.next();
                        String attrId = attr.getID();
                        System.out.println("Attribute ID retrieved is" + attrId);
                        for (Enumeration vals = attr.getAll();vals.hasMoreElements(); System.out.println(attrId + ": " + vals.nextElement()));
                   ctx.close();
              catch(Exception e)
                   System.err.println("Problem querying DNS: " + e);
                   e.printStackTrace();
    The code runs fine and I get the output as follows
    0 100 389 ib500ad1.indbank.in
    0 100 389 ib500ad2.indbank.in
    I have following questions
    1) Do these servers which are returned are the domain controllers or the ldap servers.?(or both domaincontrollers and ldap server are same)
    2) how to extract the server name alone from this string.
    3) If these two server names are domain controllers then how can I query for a DNS for Domain controllers that advertise the service, then try to see if the domain controllers are answering, and if so choose the one with the fastest answer time (to avoid choosing a domain controller over WAN).
    Thanks in advance.
    -Hiubert

  • How to get the Server Name in Crystal

    Hi All,
    We created a Crystal Report that pulls images from a File Location at the run time and this File Location is different for each environment (D-Q-P). We are trying to automate the file location by the server name. Is there any function in Crystal Reports that we can get the server name so we know if it is D-Q or P system?
    Thank you,

    Hi,
    There is no function in CR that can fetch the Server Name. That is something you need to provide to the formula.
    If you're loading images from a location on the Server, you can always use a Relative Path. For eg: if the images would be stored in a folder called Images, then you can write a formula on the 'Graphic Location' for the OLE object as:
    "/Images/Crystal.jpg"
    This will load the image from the folder when it is run on D, Q or P.
    Hope this helps!
    -Abhilash

  • How to get a server name through the load balancer

    Hi.
    I'd like to get the server name where is my application installed. There are some servers and clients access there throuth the load balancer. When I try to get it with request.getServerName(), I get the virtual address of the load balancer.
    Any suggestions?
    Thanks.

    Dear Sikindar;
    THanks for your cooperation, but I believe that these Tcodes will eb helpful if I know the table name, actually we don't know its name and that's what I'm asking about, how can I get the table name for the ABAPer?
    Appreciating your cooperation.
    Best Regards;
    Lobna

  • How to get managed server name  in Weblogic10.2 ?

    Hi
    I want to get managed server name from a cluster in a servlet or util project class whom that one is called by ?
    Do I have to implement any interface or I have to extends a class ? Please help me to resolved.
    Thanks

    Here is a snippet of code that I use in WL10 MP1 that works fine:
    import javax.management.MBeanServer;
    import javax.management.ObjectName;
    import javax.naming.InitialContext;
    String managedServerName = null;
    InitialContext ctx = null;
    try {
    //fetch managed server name by accessing the
    //RuntimeServerMBean using the
    //MBeanServer interface
    ctx = new InitialContext();
    MBeanServer server = (MBeanServer) ctx.lookup("java:comp/env/jmx/runtime");
    ObjectName service = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
    managedServerName = (String) server.getAttribute(service, "ServerName");
    } catch (Exception ex) {
    //error occurred
    } finally {
    if (ctx != null) {
    try {
    ctx.close();
    } catch (Exception dontCare) {

  • How to get the server name/hostname on which JVM is running?

    How to get the server name/hostname on which JVM is running from the Servlet or normal class?

    InetAddress.getLocalHost()

  • How to get the Server name only?

    Hello,
    I would like to get this part of server's URL: "http://<host_name>"
    I am familiar with the Object WDURLGenerator but I don't see a method to do that, all the methods require manipulating the received String. Is there a method to get only the part I've mentioned?
    Roy

    Hi,
    String sysname = System.getProperty("SAPSYSTEMNAME");
    String hostname = System.getProperty("j2ee.dbhost");
    will give the server name..then u can say http://<hostname>...

  • Get Application Server Name and Version

    Hello All,
    Is it possible to get the Application Server Name and Version using Java?
    To simplify my question, if I am running Weblogic, the jsp page should tell me that I am running Weblogic Version <number> or IBM WebSphere Version <number>.
    Thanks

    I get an error when I put this line in my jsp page:
    out.println(" Server Info: " +getServletContext().getServerInfo());
    Is there something I am missing?
    symbol : method getServletContext ()
    location: class jsp_servlet._jsp._mu.__showmxversion
    out.println(" Server Info: " +getServletContext().getServerInfo()); //[ /jsp/mu/showMXVersion.jsp; Line: 16]

  • Get local server name at runtime

    Hi all,
    I am looking for a function module or a system parameter that can give me the current server name that my ABAP program runs on.
    I need to export the returned server name to parameter
    TARGETSERVER of function module 'JOB_CLOSE'.
    Thanks for your time,
    Eyal.
    Message was edited by: Eyal Alsheikh
    Message was edited by: Eyal Alsheikh

    Hi Eyal
    You can make use of following FMs
    1. <b>"FIND_DB_APPLICATION_SERVER"</b> gives the server name via the export parameter <b>"SERVERNAME"</b> .
    2. <b>"TH_GET_ACTIVE_SERVER"</b> gives the server name via the export parameter <b>"SERVER"</b> .
    3. <b>"RFC_GET_LOCAL_SERVERS"</b> will give a list containing some info about servers, then you can use the FM <b>"TH_USER_INFO"</b> to get user's host address from the exporting parameter <b>"HOSTADDR"</b>. Then you can look-up the list you retrieved by the first FM where the first four characters at the field <b>"HOSTADR"</b> is the same with the user's. The server name is contained at the field <b>"NAME"</b> of the same row.
    <i>As another thing, let me introduce you SDN forums pointing system: If you find a post helpful about solving your question, you can assign points to the post. You can do this by clicking the yellow star icon at the header of each post. You can assign;
    - one 10 points (solved)
    - two 6 points (very helpful answer)
    - many 2 points (helpful answer)</i>
    Kind regards...
    *--Serdar

  • Getting weblogic server name

              Is there a way to get the name of the WebLogic server programmatically?
              I need to create a JSP or servlet that will display the name of the server it
              is running on.
              I am trying to create a JSP/servlet that will be deployed into a cluster. Somehow,
              each process running needs a way to determine which server they are currently
              running on. Using the server name was my first thought.
              Any thoughts?
              -Fred
              

    There are a set of Runtime mbeans that will give you this data.
              http://edocs.bea.com/wls/docs81/javadocs/weblogic/management/runtime/package-summary.html
              and
              http://edocs.bea.com/wls/docs81/jmx/
              Cheers
              mbg
              "Fred Head" <[email protected]> wrote in message
              news:3ee4c1ad$[email protected]..
              >
              > Is there a way to get the name of the WebLogic server programmatically?
              >
              > I need to create a JSP or servlet that will display the name of the server
              it
              > is running on.
              > I am trying to create a JSP/servlet that will be deployed into a cluster.
              Somehow,
              > each process running needs a way to determine which server they are
              currently
              > running on. Using the server name was my first thought.
              >
              > Any thoughts?
              >
              > -Fred
              

  • Get License Server name via SDK

    Hi,
       Is there a way that an addon can get to the SAP License Server name using the DI or UI API? there is a specific requirement in one of our addons to rech out to the SAP License server.
    I can always ask the user to enter it in as a part of the addon setup but I was wondering if there was an automated way of doing this.
    Gopal

    Hi Gopal,
    You can go to the SLIC table in SBO-COMMON and see the licence-server name and (for SBO 2005) the port
    I think you should make a query for it.
    Regards,
    Ad

  • Getting cep server name

    Hi,
    I am working on a CEP Cluster. Is there a way to get the cep server name of current node in java code?

    You could probably use ConfigurationPropertyPlaceholderConfigurer to inject the setting from config into your java code.

  • How to get report Server Name and Environment ID in Report

    How to print report Server Name and Environment ID in Report 10G.(Through in package or others)
    I'm also using Oracle Application Server 10G.

    Hi,
    Server and envid are the parameters passed along with Reports URL call.
    These variables value can be traped in Report by defining SERVER , ENVID named user parameters.
    Once trapped, can be printed on Report.
    Just ensure that these users parameters are not exposed to Parameter page, otherwise user may end up changing it.
    Thanks

  • Getting OAS server name in oracle reports

    Hi Experts,
    I need to get the OAS name in the After parameter form trigger. Is there any built-in funtion that will return the Current OAS name? Please help me. Thanks in advance.
    Regards,
    J.P

    Hello,
    When using the Reports Servlet some "extra" parameters are passed :
    http://download.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_run.htm#i1009092
    If you want to read these paramaters values , you need to "declare" these parameters in your Reports
    Regards

  • Whats the best way to get the server name in a servlet deployed to a cluster?

              Hi,
              I have a servlet in a web application that is deployed to a cluster, just
              wondering what is the best way to get the name of the node that the server is
              running on at run time??
              Thanks
              

              Please try to modify the following code and test for your purpose: (check Weblogic
              class document for detail)
              import javax.naming.*;
              import weblogic.jndi.*;
              import weblogic.management.*;
              import weblogic.management.configuration.*;
              import weblogic.management.runtime.*;
              MBeanHome home = null;
                   try{
                        //The Environment class represents the properties used to create
                             //an initial Context. DEfault constructor constructs an Environment
                             //with default properties, that is, with a WebLogic initial context.
                             //If unset, the properties for principal and credentials default to
                             //guest/guest, and the provider URL defaults to "t3://localhost:7001".
                             Environment env = new Environment();
                             //Sets the Context.PROVIDER_URL property value to the value of
                             //the argument url.
                             if(admin_url!=null){
                                  env.setProviderUrl(admin_url);
                                  //Sets the Context.SECURITY_PRINCIPAL property to the value of
                                  //the argument principal.
                                  env.setSecurityPrincipal(username);
                                  //Sets the value of the Context.SECURITY_CREDENTIAL property to
                                  //the value of the argument cedentials
                                  env.setSecurityCredentials(password);
                                  //Returns an initial context based on the properties in an Environment.
                                  ctx = env.getInitialContext();
                             }else ctx = new InitialContext();
                             home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
                             ctx.close(); //free resource
                             // or if looking up a specific MBeanHome
                             //home = (MBeanHome) ctx.lookup(MBeanHome.JNDI_NAME + "." + serverName);
                             DomainMBean dmb = home.getActiveDomain(); //Get Active Domain
                             ServerMBean[] sbeans = dmb.getServers(); //Get all servers
                             if(sbeans!=null){
                                  for(int s1=0; s1<sbeans.length; s1++){
                                       String privip = sbeans[s1].getListenAddress();
                                  sbeans[s1].getName();
                             sbeans[s1].getListenPort();
                                                 WebServerMBean wmb = sbeans[s1].getWebServer();
                   }catch(Exception ex){
              "Gao Jun" <[email protected]> wrote:
              >Is there any sample code? Thanks
              >
              >Best Regards,
              >Jun Gao
              >
              >"Xiang Rao" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Sure. You can use the Weblogic management APIs to query ServerBean.
              >>
              >>
              >> "Me" <[email protected]> wrote:
              >> >
              >> >Thanks for your reply, i was hoping to find a better way for example
              >> >a class in
              >> >weblogic API.
              >> >
              >> >Thanks
              >> >
              >> >"Xiang Rao" <[email protected]> wrote:
              >> >>
              >> >>Physical: InetAddress.getLocalHost().getHostName()
              >> >>Weblogic: System.getProperty("weblogic.Name");
              >> >>
              >> >>
              >> >>"Me" <[email protected]> wrote:
              >> >>>
              >> >>>Hi,
              >> >>> I have a servlet in a web application that is deployed to a
              >cluster,
              >> >>>just
              >> >>>wondering what is the best way to get the name of the node that
              >the
              >> >>server
              >> >>>is
              >> >>>running on at run time??
              >> >>>
              >> >>>Thanks
              >> >>
              >> >
              >>
              >
              >
              

Maybe you are looking for

  • Quicktime Pop-up videos on my webpage

    Forgive me for my inexperience - first time on a forum... I am using FrontPage to design my webpage and working in Windows Internet Explorer. *WHAT I'M TRYING TO ACCOMPLISH:* On my webpage I want to have a selection of photos that link to (.mp4) vide

  • Vendor part number Information

    Dear Gurus, How to find vendor part number information in sap? it's there any table or standard report? Thanks and Regards, Deethya.B

  • Could not import javax.ejb.* package

    On compiling my EJB program the following errors appears C:\bea\wlserver6.0sp1\samples\examples\ejb\basic\ValidateBean>javac ValidateBean .java ValidateBean.java:3: Package javax.ejb not found in import. import javax.ejb.*; ^ ValidateBean.java:4: Cla

  • Gantt chart in OBIEE11115

    Hi , We got a requirement to create a Gantt Chart in obiee11115 for project module, Can any provide me any document to create Gantt chart in obiee11115 I found this link http://oraclebizint.wordpress.com/2007/12/06/oracle-bi-ee-101332-marquee-images-

  • Where can i get a version of iMovie to run on OS 10.9.5?

    I have a MacBook Air with 10.9.5 & want to install iMovie, but the App store only has a version that runs on OS 10.10. I don't want to update to 10.10 because it uses too much ram. Does anyone have an idea on how I can get iMovie for 10.9.5, PLEASE (