Retrieve multiple user's DisplayName values from LDAP server

Hi,
I have a report in answers, which will show the UserIds information pulling from a database table. These users information is stored in the LDAP server and I want to retrieve the DisplayName or FirstName-LastName (if possible) of the userids that I have in the report.
Any pointers on how can I implement that in the repository by using IB, by defining variables etc?
Thanks in advance.
Rajesh Gurram

I created PL/SQL table function to get users from ldap and view based on it (Oracle database).
create or replace
type ldap_users_t as object(
  dn varchar2(200),
  full_name varchar2(200),
  user_name varchar2(200),
  reg_number number,
  email varchar2(200) 
create or replace
TYPE ldap_users_t_ct as table of ldap_users_t;
create or replace
function get_ldap_users return ldap_users_t_ct PIPELINED
is
   out_rec             ldap_users_t := ldap_users_t (null,null,null,null,null);
   retval              PLS_INTEGER;
   ldap_session    DBMS_LDAP.SESSION;
   ldap_attrs       DBMS_LDAP.string_collection;
   ldap_message  DBMS_LDAP.MESSAGE;
   ldap_entry      DBMS_LDAP.MESSAGE;
   ldap_dn          VARCHAR2 (256);
   ldap_attr_name   VARCHAR2 (256);
   i PLS_INTEGER;
   user_name           DBMS_LDAP.string_collection;
   full_name           DBMS_LDAP.string_collection;
   reg_number          DBMS_LDAP.string_collection;
   email               DBMS_LDAP.string_collection;
   ldap_host           VARCHAR2 (256);
   ldap_port           VARCHAR2 (256);
   ldap_user           VARCHAR2 (256);
   ldap_passwd         VARCHAR2 (256);
   ldap_base           VARCHAR2 (256);
BEGIN
   retval := -1;
   ldap_host :=       '********************';
   ldap_port :=       '********************';
   ldap_user :=       '********************';
   ldap_passwd := '********************';
   ldap_base :=   '********************';
   DBMS_LDAP.use_exception := TRUE;
   ldap_session := DBMS_LDAP.init (ldap_host, ldap_port);
   retval := DBMS_LDAP.simple_bind_s (ldap_session, ldap_user, ldap_passwd);
   ldap_attrs (1) := '*';
   retval :=DBMS_LDAP.search_s (ldap_session, ldap_base,DBMS_LDAP.scope_subtree,
          'objectclass=*',ldap_attrs,0,ldap_message);
   ldap_entry := DBMS_LDAP.first_entry (ldap_session, ldap_message);
   WHILE ldap_entry IS NOT NULL
   LOOP      
      ldap_dn := DBMS_LDAP.get_dn (ldap_session, ldap_entry);
      user_name := DBMS_LDAP.get_values (ldap_session, ldap_entry, 'uid');
      full_name := DBMS_LDAP.get_values (ldap_session, ldap_entry, 'cn');
      reg_number := DBMS_LDAP.get_values (ldap_session, ldap_entry, 'employeeNumber');
      email := DBMS_LDAP.get_values (ldap_session, ldap_entry, 'mail');
      out_rec.dn:=ldap_dn;
      out_rec.user_name:=null;
      out_rec.full_name:=null;
      out_rec.reg_number:=null;
      out_rec.email:=null;
      IF user_name.COUNT > 0
        THEN out_rec.user_name:=user_name(0);
      END IF;
      IF full_name.COUNT > 0
        THEN out_rec.full_name:=full_name(0);
      END IF;
      IF reg_number.COUNT > 0
        THEN out_rec.reg_number:=reg_number(0);
      END IF;
      IF email.COUNT > 0
        THEN out_rec.email:=email(0);
      END IF;
      ldap_entry := DBMS_LDAP.next_entry (ldap_session, ldap_entry);
      pipe row(out_rec);
   END LOOP;
   retval := DBMS_LDAP.msgfree (ldap_message);
   retval := DBMS_LDAP.unbind_s (ldap_session);
END;
create or replace view scr_ldap_users_v as select * from table(get_ldap_users);

Similar Messages

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • RE: (forte-users) Reading return value from Javaprogram

    when using the RunCommand method you can specify the an error file:
    task.part.os.RunCommand(command = l_tdCommandLine,
    isSynchronous = TRUE,
    inputFile = Nil,
    outputFile = Nil,
    errorFile = l_ErrorFile.GetLocalName(TRUE));
    BEGIN
    l_ErrorFile.Open(SP_AM_READ);
    EXCEPTION
    WHEN Ex: FileResourceException DO
    l_ErrorFile = NIL;
    task.ErrorMgr.Clear();
    END;
    IF l_ErrorFile <> NIL THEN
    l_tdFileContents : TextData = New();
    l_ErrorFile.ReadText(l_tdFileContents);
    l_ErrorFile.Close();
    END IF;
    Have you java program output the return value to the standard IO. This way
    you will have an error file that you can read from Forte.
    ka
    -----Original Message-----
    From: Anthony D [mailto:saigonxyahoo.com]
    Sent: Tuesday, September 12, 2000 7:49 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Reading return value from Java program
    Hi,
    Does anyone know whether Forte application can
    read a return value from a Java program?
    I'm using the RunCmd method to invoke the Java
    program. I'd like to read the return value from the
    Java program. How do I go about doing it?
    Any suggestion will be appriciated.
    Thanks
    AD
    http://mail.yahoo.com/
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    when using the RunCommand method you can specify the an error file:
    task.part.os.RunCommand(command = l_tdCommandLine,
    isSynchronous = TRUE,
    inputFile = Nil,
    outputFile = Nil,
    errorFile = l_ErrorFile.GetLocalName(TRUE));
    BEGIN
    l_ErrorFile.Open(SP_AM_READ);
    EXCEPTION
    WHEN Ex: FileResourceException DO
    l_ErrorFile = NIL;
    task.ErrorMgr.Clear();
    END;
    IF l_ErrorFile <> NIL THEN
    l_tdFileContents : TextData = New();
    l_ErrorFile.ReadText(l_tdFileContents);
    l_ErrorFile.Close();
    END IF;
    Have you java program output the return value to the standard IO. This way
    you will have an error file that you can read from Forte.
    ka
    -----Original Message-----
    From: Anthony D [mailto:saigonxyahoo.com]
    Sent: Tuesday, September 12, 2000 7:49 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Reading return value from Java program
    Hi,
    Does anyone know whether Forte application can
    read a return value from a Java program?
    I'm using the RunCmd method to invoke the Java
    program. I'd like to read the return value from the
    Java program. How do I go about doing it?
    Any suggestion will be appriciated.
    Thanks
    AD
    http://mail.yahoo.com/
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • How to retrieve null-valued attributes from LDAP server.

    I am using JNDI api to do search operations on a Java Directory Server( part of SunOne).
    However, I found all the attributes that do not have values are automatically filtered out from the search result.
                   NamingEnumeration answer = ctx.search(ctxName, filterExpr, cons);
                   while(answer.hasMore()){
                        SearchResult sr = (SearchResult)answer.next();
                        Attributes attrs = sr.getAttributes();
                        for(NamingEnumeration ne = attrs.getIDs();ne.hasMore();){
                             System.out.println("ids:"+ne.next());
                        System.out.println("-------------------------------------------------------");
                       for (NamingEnumeration ae = sr.getAttributes().getAll(); ae.hasMore();) {
                           Attribute attr = (Attribute)ae.next();
                           System.out.println("attrName:"+attr.getID());
                           //System.out.println("attribute: " + attr.getID());
                           NamingEnumeration e = attr.getAll();
                           while(e.hasMore()){
                                 System.out.println("  attrVal:"+e.next());
                       }Is there anything I did wrong here?
    Here are a couple of things I noticed,
    1. in a Softerra LDAP browser, those no-valued attributes are not present either. But in JXplorer, I can see the full list that includes the attributes that do not have a value.
    2. I had Schema disabled in the server console.
    Thank you in advance.

    There are only two ways to read data from Directory Server:
    1. a. just fetch the entry
    b. display the content
    2. a. fetch the entry
    b. parse the entry and figure what object classes it is of
    c. lookup each object class definition in the schema and retrieve the attribute list
    d. combine the attributes of the entry with all the "possible" attributes of its object classe(s)
    e. display the content
    Here's for an easy example we can relate to:
    I have the following entry in my DS
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaudIf you use method 1, you will get just what is stored in the db. That is:
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaudif you use method 2, you will get:
      cn=the_duuuuuude,dc=forum,dc=sun,dc=com
      objectClass: person
      cn: the_duuuuuude
      sn: arnaud
      description:
      seeAlso:
      telephoneNumber:
      userPassword:because when you looked up the 'person' object class you got this:
    objectClasses: ( 2.5.6.6 NAME 'person' DESC 'Standard LDAP objectclass' SUP top MUST ( sn $ cn ) MAY ( description $ seeAlso $ telephoneNumber $ userPassword ) X-ORIGIN 'RFC 2256' )Now the important thing to note is that physically in the database, the attributes description, seeAlso, telephoneNumber and userPassword are NOT stored. It's not that they have a 'null' value. They're just not there. It doesn't stop you from looking up the schema.
    Optimally, in your client, you would fetch the whole server schema and cache it so you have to do the extra round trip for every entry you process.
    The difference you observe with various LDAP browsers might simply be that one uses method 1 and the other method 2.
    Hope this helps wrap your mind around this.
    -=arnaud=-

  • Retrieving user and group information from LDAP using j_securrity_check

    Hi
    I am using j_security_check to authenticate users against LDAP. I have made all necessary configuration for the server to perform LDAP group search as well as mentioned in the WAS documentation of LDAP settings. Now, how can I retrieve the user and the user group info after the j_secuirty_check. Apart from the UserPrincipal object which I can get from the request which just has the user name, is there any other object which will give me the user and user group info by which I need to connect to LDAP using my java code to retrieve these informations?
    Regards
    Deepak

    Hi
    I am using j_security_check to authenticate users
    against LDAP. I have made all necessary configuration
    for the server to perform LDAP group search as well
    as mentioned in the WAS documentation of LDAP
    settings. Now, how can I retrieve the user and the
    user group info after the j_secuirty_check.
    Apart
    from the UserPrincipal object which I can get from
    the request which just has the user name, is there
    any other object which will give me the user and user
    group info by which I need to connect to LDAP using
    my java code to retrieve these informations?Hmm, you don't need the user group info to connect to the LDAP server, right? You would need the user's Id (which you have) and password (which you don't). You could use the LDAP credentials and bind as that to look up the user info via the user id. Or if the server is set up to allow anonymous bind you could do it without credentials. But if all you want is group info then you should be able to call Security.getCurrentSubject().getPrincipals() to get the user principal as well as all groups (this is true in BEA WebLogic at least).
    Good Luck
    Lee

  • Unable to Retrieve Attributes from LDAP Server

    I have a problem. I was wondering if anyone can assist me. I am new to LDAP servers and JNDI. I cannot retrieve any attributes from the users listed in my data entry. Any assistance would be greatly appreciated! Thanks.
    I created an entry in the LDAP server that looks like this:
    �o=somedn�
    |
    �ou=people, o=somedn�
    The �ou=people, o=somedn� entry contains fictitious users. The LDAP server is connected to a MySQL database. When I write Java code to read the attributes of a given user whose fullname (cn) is �Vinny Luigi�, as listed in the database, I receive an error that starts with the following:
    javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name 'cn=Vinny Luigi,ou=people'
    The code I used is based on the Sun JNDI tutorial. Sun�s code is at http://java.sun.com/products/jndi/tutorial/basics/directory/src/GetattrsAll.java. My version of the code is below:
    * @(#)GetattrsAll.java     1.5 00/04/28
    * Copyright 1997, 1998, 1999 Sun Microsystems, Inc. All Rights
    * Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free,
    * license to use, modify and redistribute this software in source and
    * binary code form, provided that i) this copyright notice and license
    * appear on all copies of the software; and ii) Licensee does not
    * utilize the software in a manner which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any
    * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
    * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE
    * HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE
    * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
    * MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN
    * NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
    * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
    * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
    * OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
    * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line
    * control of aircraft, air traffic, aircraft navigation or aircraft
    * communications; or in the design, construction, operation or
    * maintenance of any nuclear facility. Licensee represents and warrants
    * that it will not use or redistribute the Software for such purposes.
    import javax.naming.*;
    import javax.naming.directory.*;
    import java.util.Hashtable;
    * Demonstrates how to retrieve all attributes of a named object.
    * usage: java GetattrsAll
    class GetattrsAll
         static void printAttrs(Attributes attrs)
              if (attrs == null)
                   System.out.println("No attributes");
              else
                   /* Print each attribute */
                   try
                        for (NamingEnumeration ae = attrs.getAll(); ae.hasMore();)
                             Attribute attr = (Attribute) ae.next();
                             System.out.println("attribute: " + attr.getID());
                             /* print each value */
                             for (NamingEnumeration e = attr.getAll(); e.hasMore(); System.out.println("value: " + e.next()) )
                   } catch (NamingException e) {
                        e.printStackTrace();
         public static void main(String[] args) {
              // Set up the environment for creating the initial context
              Hashtable env = new Hashtable(100);
              env.put(Context.INITIAL_CONTEXT_FACTORY,
                        "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://localhost:10389/o=somedn");
              try {
                   // Create the initial context
                   DirContext ctx = new InitialDirContext(env);
                   // Get all the attributes of named object
                   System.out.println("About to use ctx.getAttributes()");
                   Attributes answer = ctx.getAttributes("cn=Vinny Luigi,ou=people");
                   // Print the answer
                   printAttrs(answer);
                   // Close the context when we're done
                   ctx.close();
              } catch (Exception e) {
                   e.printStackTrace();
    The primary key of the database is id_pk. Below is a copy of the mapping.xml file which maps the LDAP server entry to the database:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapping PUBLIC "-//Penrose/DTD Mapping 1.2//EN" "http://penrose.safehaus.org/dtd/mapping.dtd">
    <mapping>
    <entry dn="o=somedn">
    <oc>organization</oc>
    <oc>top</oc>
    <at name="o" rdn="true">
    <constant>somedn</constant>
    </at>
    <aci>
    <permission>rs</permission>
    </aci>
    </entry>
    <entry dn="ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>organizationalUnit</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="cn">
    <constant>"fullname"</constant>
    </at>
    <at name="ou" rdn="true">
    <constant>people</constant>
    </at>
    <at name="sn">
    <constant>"lastname"</constant>
    </at>
    </entry>
    <entry dn="id_pk=...,ou=people,o=somedn">
    <oc>inetOrgPerson</oc>
    <oc>organizationalPerson</oc>
    <oc>person</oc>
    <oc>top</oc>
    <at name="Position_">
    <variable>usertable9.Position_</variable>
    </at>
    <at name="id_pk" rdn="true">
    <variable>usertable9.id_pk</variable>
    </at>
    <at name="fullname">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="lastname">
    <variable>usertable9.lastname</variable>
    </at>
    <at name="cn">
    <variable>usertable9.fullname</variable>
    </at>
    <at name="sn">
    <variable>usertable9.lastname</variable>
    </at>
    <source name="usertable9">
    <source-name>usertable9</source-name>
    <field name="Position_">
    <variable>Position_</variable>
    </field>
    <field name="id_pk">
    <variable>id_pk</variable>
    </field>
    <field name="fullname">
    <variable>cn</variable>
    </field>
    <field name="lastname">
    <variable>sn</variable>
    </field>
    </source>
    </entry>
    </mapping>
    Thanks.

    The complete name (Distinguished Name) of the user you're searching is 'cn=Vinny Luigi,ou=people,o=somedn'.
    Regards,
    Ludovic.

  • GRC 5.3 CUP SP16 - User info not loading from LDAP into CUP

    Hello,
    We have multiple LDAPS that we needed to connect to our CUP system to authenticate the userids before a request can be created for them. And also to bring in Manager ID and manager email from LDAP as the first level approver for requests.
    My client hasn't maintained the actual LDAP userids, Manager and manager email fields correctly, so we utlized three other custom fields in LDAP and then did field mapping in CUP for those fields. But even when the connection to all the LDAPs is successful, there's no user information being pulled in from LDAP into CUP.  I noticed that when I use our backend SAP QA system as 'User Data Source' while using multiple LDAPS for 'User Detail Source Data' , it only reads data from SAP QA system SU01 area and even when I'm trying to create requests, no Manager info is being pulled from LDAPS for that user id. 
    SAP does not allow the use of multiple LDAPS for the configuration-->User Data Source , top option.  So, if a client has userids in multiple systems, it can only read from one data source.  But even when I temporarily assigned one active directory LDAP to the 'user data source' option, it stated, no records found. So, something is up that no data is being pulled from LDAPs even when the connection to those systems is successful. I just asked our AD guy to temporarily assign domain admin rights to that LDAP connection ID to see if it's access issue, and still I am not getting any LDAP data to read into GRC CUP.
    Anyone else has had this issue? Is there especial access that the LDAP connection id needs access in LDAP to be able to retreive data into GRC? Is there any jobs that need to be run to read LDAP data. I thought it should be live as the system is connected to LDAPs. I don't understand if the connection is successful, why the user info is not being pulled from there and even after the LDAP custom field mapping is done, those field values are not showing up on requests.
    We need the following to happen:
    1). Authenticate the custom userid field in LDAPs to ensure this user exist as an employee b4 request can be created for the user. For this I have configured the multiple LDAPS for the 'Authentication'. But it doesn't seem to confirm that option when creating a request for a user.
    2). The user details info source should bring in the custom manager id and manager email into the request to send the first level of approval via workflow to that manager. Since SAP doesn't give the option to define approvers per user group values in CUP, we had to actually map all the User Owner approvers this way since their direct managers are not aware of  what to request as the User owner approvers per user group are.  So, we added custom fields for Manager id and Manager EMail into LDAP to be ready automatically into the request when reading user id while creating request.
    I will greatly appreciate anyone's help on how they got the LDAP field values to be read into GRC CUP for request processing and what type of encripted access can a LDAP connection id have without assigning it complete domain admin rights on an open port 389 for LDAP and GRC CUP connection.
    Thanks and Regards,
    Alley

    Hi Alley,
    1). Authenticate the custom userid field in LDAPs to ensure this user exist as an employee b4 request can be created for the user. For this I have configured the multiple LDAPS for the 'Authentication'. But it doesn't seem to confirm that option when creating a request for a user.
    This is not possible. You can have only 1 LDAP. Why you want to authenticate the user in different sources?? CUP looks at only one user source, not many. The below wiki explains you the configuration part:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b089fb71-a3b7-2a10-64a2-8c77243b0664
    2). The user details info source should bring in the custom manager id and manager email into the request to send the first level of approval via workflow to that manager. Since SAP doesn't give the option to define approvers per user group values in CUP, we had to actually map all the User Owner approvers this way since their direct managers are not aware of what to request as the User owner approvers per user group are. So, we added custom fields for Manager id and Manager EMail into LDAP to be ready automatically into the request when reading user id while creating request.
    Based on user group is not possible. However, if you wish to maintain the Manager's Field, ensure that the CUP mapping is done correctly from the Configuration, Field Mapping, LDAP Mapping.
    While defining the workflow, take the approver determinator as Manager. This will route the request to the users manager. Also, ensure that LDAP is the source in all the confiuration areas in CUP.
    Check note 1228996 for more information.
    Hope this helps!!
    Regards,
    Raghu

  • PDF for multiple users with different values

    Is there a way to create a PDF to be sent to multiple users but have different values in the PDF? For expample employee A's offer letter is for $50/hour while employee B's offer letter is for $55/hour. But they have the same offer letter just with different values.
    I have Enterprise EchoSign and FormsCentral.
    Thank you!

    Hi,
    Thanks for asking, but FormsCentral currently does not support this.
    Perry

  • Query multiple occurances of min value from table using group by

    Hello all,
    I am using Oracle 10.2 on Windows 2003
    I am attempting to select the min value from a table, and if there are multiple occurances of a min value, to list all not just one row. For example, the following query
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '3' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '4' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '5' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '6' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    select trunc(t_date,'YYYY') t_date, min(t_value) min_value
    from test1
    group by trunc(t_date,'YYYY') gives the following results
    t_date         min_value
    01-JAN-09    1
    01-JAN-10    1so I looked at the forums and tried the following query
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '3' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '4' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '5' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '6' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '1' t_value from dual
    select t_date,min_value
    from (select t_date,min(t_value) min_value,
    rank() over (order by min(t_value) ASC) RN
    from test1 group by t_date)
    where rn=1I get the desired results with this query, which are
    t_date           min_value
    01-NOV-09     1
    01-JAN-10      1
    01-JUN-10      1
    01-JUL-10       1the problem is, when I change the values in the test1 table to the following
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '123' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '21' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '13' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '24' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '15' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '26' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '100' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    select t_date,min_value
    from (select t_date,min(t_value) min_value,
    rank() over (order by min(t_value) ASC) RN
    from test1 group by t_date)
    where rn=1i get the following results
    t_date          min_value
    01-JUN-10     100I expected to get the results
    t_date         min_value
    01-DEC-09     2
    01-JUL-10      2any help would be appreciated
    Cheers

    Because t_value is character.
    You should To_NUMBER(t_value)
    with test1 as(
    select to_date('2009-11-01','YYYY-MM-DD') t_date, 't_1' t_name, '123' t_value from dual
    union all select to_date('2009-12-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    union all select to_date('2010-01-01','YYYY-MM-DD') t_date, 't_1' t_name, '21' t_value from dual
    union all select to_date('2010-02-01','YYYY-MM-DD') t_date, 't_1' t_name, '13' t_value from dual
    union all select to_date('2010-03-01','YYYY-MM-DD') t_date, 't_1' t_name, '24' t_value from dual
    union all select to_date('2010-04-01','YYYY-MM-DD') t_date, 't_1' t_name, '15' t_value from dual
    union all select to_date('2010-05-01','YYYY-MM-DD') t_date, 't_1' t_name, '26' t_value from dual
    union all select to_date('2010-06-01','YYYY-MM-DD') t_date, 't_1' t_name, '100' t_value from dual
    union all select to_date('2010-07-01','YYYY-MM-DD') t_date, 't_1' t_name, '2' t_value from dual
    select t_date,min_value
    from (select t_date,min(t_value) min_value,
    rank() over (order by min(To_NUMBER(t_value)) ASC) RN
    from test1 group by t_date)
    where rn=1

  • Select employee id from ldap server

    Hello Everyone,
    I don't know LDAP. Because of sorry. If I say about my question incorrectly, please correct and ask me.
    I use authentication LDAP server in my APEX application. Employees have username, password and employee_id.
    Firstly, employee entry the applicatioın with username, password. So, I find his employee_id by using username. I didn't find example about it.
    How can i do? Any suggestion?
    Thanks.

    Does this peace of code help? It searches the LDAP directory. Specify the variables correctly. Hope this helps.
    DECLARE
    retval PLS_INTEGER;
    my_session DBMS_LDAP.session;
    my_attrs DBMS_LDAP.string_collection;
    my_message DBMS_LDAP.message;
    my_entry DBMS_LDAP.message;
    entry_index PLS_INTEGER;
    my_dn VARCHAR2(256);
    my_attr_name VARCHAR2(256);
    my_ber_elmt DBMS_LDAP.ber_element;
    attr_index PLS_INTEGER;
    i PLS_INTEGER;
    my_vals      DBMS_LDAP.STRING_COLLECTION ;
    ldap_host VARCHAR2(256);
    ldap_port VARCHAR2(256);
    ldap_user VARCHAR2(256);
    ldap_passwd VARCHAR2(256);
    ldap_base VARCHAR2(256);
    BEGIN
    retval := -1;
    -- Please customize the following variables as needed
    ldap_host := 'specify host';
    ldap_port := '389';
    -- In case of update/insert/delete need change ldap_user to other.
         -- ldap_user := 'cn=orcladmin';
         -- ldap_passwd:= 'welcome';
    -- set User and password to NULL for anonymous user.
    ldap_user := 'user@domain';
    ldap_passwd:= 'Password';
    ldap_base := 'CN=Users,DC=specify DC';
    -- end of customizable settings
    -- Start output Header--
    DBMS_OUTPUT.PUT_LINE('+++++++++++++++++++++++++++++++++++++++++++++++++++');
    DBMS_OUTPUT.PUT('> DBMS_LDAP Search Example ');
    DBMS_OUTPUT.PUT_LINE('');
    DBMS_OUTPUT.PUT_LINE(RPAD('> LDAP Host ',25,' ') || ': ' || ldap_host);
    DBMS_OUTPUT.PUT_LINE(RPAD('> LDAP Port ',25,' ') || ': ' || ldap_port);
    -- Choosing exceptions to be raised by DBMS_LDAP library.
    DBMS_LDAP.USE_EXCEPTION := TRUE;
    my_session := DBMS_LDAP.init(ldap_host,ldap_port);
    DBMS_OUTPUT.PUT_LINE (RPAD('> Ldap session ',25,' ') || ': ' ||
    RAWTOHEX(SUBSTR(my_session,1,8)) ||
    '(returned from init)');
    -- bind to the directory
    retval := DBMS_LDAP.simple_bind_s(my_session,
    ldap_user, ldap_passwd);
    DBMS_OUTPUT.PUT_LINE(RPAD('> simple_bind_s Returns ',25,' ') || ': '
    || TO_CHAR(retval));
    -- issue the search
    my_attrs(1) := 'dn'; -- retrieve all attributes
    retval := DBMS_LDAP.search_s(my_session, ldap_base,
    DBMS_LDAP.SCOPE_SUBTREE,
    'objectclass=*',
    my_attrs,
    0,
    my_message);
    DBMS_OUTPUT.PUT_LINE(RPAD('> search_s Returns ',25,' ') || ': '
    || TO_CHAR(retval));
    DBMS_OUTPUT.PUT_LINE (RPAD('> LDAP message ',25,' ') || ': ' ||
    RAWTOHEX(SUBSTR(my_message,1,8)) ||
    '(returned from search_s)');
    -- count the number of entries returned
    retval := DBMS_LDAP.count_entries(my_session, my_message);
    DBMS_OUTPUT.PUT_LINE(RPAD('> Number of Entries ',25,' ') || ': '
    || TO_CHAR(retval));
    DBMS_OUTPUT.PUT_LINE('+++++++++++++++++++++++++++++++++++++++++++++++++++');
    -- End output Heading --
    -- get the first entry
    my_entry := DBMS_LDAP.first_entry(my_session, my_message);
    entry_index := 1;
    -- Loop through each of the entries one by one
    while my_entry IS NOT NULL loop
    -- print the current entry
    my_dn := DBMS_LDAP.get_dn(my_session, my_entry);
    -- DBMS_OUTPUT.PUT_LINE (' entry #' || TO_CHAR(entry_index) ||
    -- ' entry ptr: ' || RAWTOHEX(SUBSTR(my_entry,1,8)));
    DBMS_OUTPUT.PUT_LINE (' dn: ' || my_dn);
    my_attr_name := DBMS_LDAP.first_attribute(my_session,my_entry,
    my_ber_elmt);
    attr_index := 1;
    while my_attr_name IS NOT NULL loop
    my_vals := DBMS_LDAP.get_values (my_session, my_entry,
    my_attr_name);
    if my_vals.COUNT > 0 then
    FOR i in my_vals.FIRST..my_vals.LAST loop
    DBMS_OUTPUT.PUT_LINE(' ' || my_attr_name || ' : ' ||
    SUBSTR(my_vals(i),1,200));
    end loop;
    end if;
    my_attr_name := DBMS_LDAP.next_attribute(my_session,my_entry,
    my_ber_elmt);
    attr_index := attr_index+1;
    end loop;
    my_entry := DBMS_LDAP.next_entry(my_session, my_entry);
    DBMS_OUTPUT.PUT_LINE(' --------------------------------------------------- ');
    entry_index := entry_index+1;
    end loop;
    -- unbind from the directory
    retval := DBMS_LDAP.unbind_s(my_session);
    DBMS_OUTPUT.PUT_LINE(RPAD('unbind_res Returns ',25,' ') || ': ' ||
    TO_CHAR(retval));
    -- Start Output Footer --
    DBMS_OUTPUT.PUT_LINE('Directory operation Successful .. exiting');
    -- Start Output Footer --
    -- Handle Exceptions
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE(' Error code : ' || TO_CHAR(SQLCODE));
    DBMS_OUTPUT.PUT_LINE(' Error Message : ' || SQLERRM);
    DBMS_OUTPUT.PUT_LINE(' Exception encountered .. exiting');
    END;
    /

  • Multiple Users - Concurrent Software Development on X Server

    How can I setup the X Server to allow for multiple users to connect and concurrently do development activity (use iPhone SDK for developing applications) activities?

    Oké, I will give it a try.
    X server, you mean MacosX server or really X server?
    However this hangs to development, I guess you should ask this in the unix forum.
    I do use MacosX server, but actually, don't `need` it for the development itself. You can use it for sharing of documents with afp smb etc, but you can do that with a client too. If people are outside of your LAN, then set up a VPN.
    Keep control who may logon and then they work as if it was local.
    I did use VPN, but for now I did turn it off. Did mess up with a few things. :-/
    What I still do,
    Docs like UML, tech docs, images, which all are project in-depended and taken from the web or from a third party, I share those via AFP.
    Project independed documents, drawing etc, and documents that a project member or I did wrote are checked in by the writer at a svn server, and are semi automatic checked out to the afp share.
    Project depended documents, drawing etc, and documents that a project member or I did wrote are checked in by the writer at a svn server, and can be checked out locally at will of the developer.
    The same with the xCode personal setting, found at
    /Users/<developer>/Library/Application Support/Developer/Shared/...
    and
    /Users/<developer>/Library/Application Support/Developer/3.2/...
    /Users/<developer>/Library/Application Support/Developer/3.1/...
    ( I use the later ones on when I am not sure if my templates or whatever is not versions wide compatible ). They are accepted by xcode.
    I will ( still busy with that ) sync parts of that with the server, but I use a sync application for that. Still no need for macosx server.
    But like the scripts.plist, it dangerous to just sync that file, when more people add scripts on that file between syncs.
    So because macosx client can do afp shares and you need a svn server ( I use Subversion ), it is no demand to have a macosX server.
    If you want to do timesharing for compiling than just install a xcode on your 'server' and leave it running and set the setting under the 'distribution build' tab in the xcode preferences. I did use this only one time, so no real experience.
    At the beginning it is hard to manage, but after a period when things get settled it good to be there.
    HTH
    If you mean something differently then someone else can fill in. and am also curious how other people or groups are doing this.
    For the specific things like VPN, I guess you have to loo at the unix or networking forum

  • How to make Adobe acrobat feature to convert SAP  Pages to PDF available for multiple users connected to the same Citrix server

    Hi,
    In my previous endeavours to solve this business requirement where multiple users will be able to use the Adobe acrobat feature to convert SAP pages inside SAP to PDF, I was told that it is not possible to do this for multiple users at the same time. However I have found an article according to which it says it is possible. Could you check it once and let me know if this article can be used for implementing the requirement stated above as this link clearly indicates that Adobe Acrobat is supported on Citrix.
    Please find the link below where it states it is adobe acrobat is supported in Citrix for multiple users.
    http://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/citrix.html.

    1. What is the Acrobat feature that you mean? There's nothing specific to SAP included with Acrobat.
    2. Yes, some Terminal Server configurations appear supported (check carefully). All users of the terminal server will need a license, so far as I know - total licenses = total individual people using.

  • Transporting user defined selection screen from one server to another

    How to transport a user defined selection screen (0100) from one server to another.
    PBO and PAI modules written in PBO and PAI events for the selection screen are
    not transported.
    How to transport the modules in the events for the selection screen.

    Hi,
    Krishna, <b>All</b> the Objects(prms,classes,tables,stru...) will be transported thru Transport Objects only..
    Check Utilities->version->Version Mgt -> Here u will have the Transport number(if it's created under trnasportable obj).If you do not find TP no,then u would hav saved that as a Local Object.
    Then Relase the TP no from SE10 Trnx.
    Rgds,
    Jothi.P

  • How to determine the error code, returned from LDAP server

    I use the next code for connect to LDAP server:
            try{
                ctx = new InitialLdapContext(env, null);
                 //if connection successfull ...
            } catch (NamingException){
                 //if error occured ...
            }Is it possible to determine the numeric error code, returned from server?

    I was just working on using openldap, binding to it and checking for expired passwords and locked accounts and it looks like that an AuthenticationException is thrown in these circumstances and the ctx is null so it is not possible process connection response controls. But you can look at operation attributes if you have password policy enabled and you are looking for these type of errors

  • Multiple Users on a Mac OS X server

    Hello everyone,
    I was recently given the responsibility for a departments Mac OS X server since I have a Linux/BSD/Unix background.
    Each semester requires a between 75 to 100 new users to be added to this departments server.
    I would like to find a script that is Mac specific that would allow multiple users to be added to the system.
    Does anyone have suggestions or good links?

    Passenger is v cool and easy but is not free.
    If you're on a tight budget check Appendix A of UserManagement_Adminv10.4B.pdf at http://www.apple.com/server/documentation/
    hth,
    b.

Maybe you are looking for

  • Read table entries at runtime

    Hi, I have a table in which I populate entries by importing a .csv file. Now on clicking OK i want to read this entries on screen in the table and store it in the internal table. How do I read these entries (can be any number of rows) and store it in

  • Raw File update: how to open Sony RX100 III files in CS5?

    I cannot download updates for CS5 Extended for Sony Raw. How can I update my Photoshop CS5 Extended to permit it to handle Raw files from my Sony RX100 III on my Mac?

  • Error during running a transpose package

    Hi Experts, We are facing an error while trying to run a transpose package. The package does not show the lines for selection of source and destination path and it gives an error when we try to click on the advance tab to see the parameters being pas

  • Transport a request from one server(quality) to another server(production)

    Hi All, I want to transport a request from one server(quality) to another server(production) Can we transport a request from quality to production programatically i.e. by using programing logic. Regards, Swarup

  • How do I redownload Photoshop Elements 10?

    I bought a bamboo drawing tablet and it came with a free copy of it (digital). I have the serial code still but I installed it on my laptop a while ago and now just want to put it on my desktop since I'm replacing my laptop soon. I just contacted the