Unique UserID(urgent)

For Example:
Emp_m: Kwok Fu Sing
Company Code: KTZ
USERID generated: KTZKFS
The user enter the EMP_NUMBER into the form, after which, he will click exec then the database will retrieve EMP_NUMBER, COMPANY CODE and other information from the database and display back to the user. USERID will also be display out to the user.
Now my problem is how do I generate the USERID by the system when user enter the EMPLOYEE NUMBER?The above is one example of how the NAME, COMPANY CODE and USERID. The first three letters of the USERID is the company code and the last three letters is the initial of the name.
After generating the USERID, the system got to double check to make sure there is no duplicates in the database.If there is duplicates in the database, system got to re-generate the password again.
Example:
Name: Kwok Fu Sing
Company Code: KTZ
USERID generated: KTZKUS
The last three letters of the name is the initial of the name whereby the initial U is the second letter of FU, the system will use the second letter to generate the USERID.
And if the database happens to have the same USERID again, the system got to re-generate the USERID again.
The name is not input by the user but is retrieve from the database,and the USERID got to be generated by the system.Only the EMPLOYEE_NUMBER and COMPANY_CODE is retrieved from the database.
Can someone show me how to write the code for this?and checking of duplicate userid?

First thing is that you should have DBA access to the database. Once you have it you can look at ALL_USERS to check if user already exists in the database. Your logic for generating unique user name should be able to handle if a user already exists in the database. I mean if generated user name is already in use then you may have to change the logic for creating unique user name and check again if it exists, you may have to do this more then once. Depending upon how many employees are there in the company and how many companies are there you may have to come up with quite a few logics for creating unique user name.

Similar Messages

  • User list synchronization and Unique userid questions

    I am new to Oracle portal and LDAP and learning more and more about Portal every day.
    Hi
    I am using Oracle 9iAS portal 3.0.9 version. I have a requirement to integrate 3rd party LDAP with Oracle Portal Single Sign On. I have white paper on Configuring Oracle9iAS Portal for LDAP authentication. I have following questions
    Paragraph from white paper (Background information):
    When using LDAP authentication or any other external repository, for that matter- the list of users for authentication is held on the external repository. However, there is also a list of users held on the Login server, which is used to associate privileges to the user. Ideally, this list is maintained transparently and automatically. In fact, if a user account is created on LDAP and a user attempts to log in, the login will succeed, and an entry is automatically created on the login server for that user, after a successful login.
    Questions:
    1.     What privileges user will be granted when synchronization process create new portal user on login server automatically?
    2.     Is it possible to customize whatever default privileges new portal user gets? If yes, how? Please provide some forum link or documentation or example.
    Unique user Id scenario.
    Our LDAP repository is setup for customers from different companies. We have requirement to integrate LDAP users with Oracle 9iAS portal 3.0.9 Single Sign On. I have two userid with same name on the LDAP from different company. For example userid jsmith from company A and jsmith from company B. Both user id do not exist on Portal Login Server. Both userids will be created automatically in Login server when LDAP and Portal synchronize user list.
    1.     How oracle portal will handle such scenario when portal requires unique userid?
    2.     Can I customize portal login screen? For example when they login they can provide userid, passwd and domain name. Where domain name could be company name.
    Let me know if you need more information. Feel free to send direct e-mail also.

    Dumlu,
    For 1, you can have the user removed from OUL in OOB scenarios, but behind IP phones it's difficult since we won't know when the PC is offline from there. Only way to know that is when CAM receives a MAC-Notification of a new MAC address being learnt. In IB, you can use heartbeat timers to log them out
    For 2, when a new MAC address is seen on the port, the MAC-Notification is sent out, and depending on your port profile the switchport will change or not. Check your port profile settings for more details on how you have it setup.
    HTH,
    Faisal

  • Unique UserID

    For Example:
    Name: Kwok Fu Sing
    Company: ACE
    USERID generated: ACEZKFS
    the NAME and COMPANY CODE is already in the database and i need to display the name and the initial of name and company in the form based on the EMPLOYEE ID entered by the user.From there, i must take out the company code and 3 initial of the NAME.Besides, I got to make sure there is no duplicate in the database as it will be treated as the USERID.
    the name is not input by the user but is retireve from the database,and the USERID got to be generated by the system.
    How do I generate the company code and 3 initial from the name together and most importantly, making sure there is no duplicates for USERID?
    If there are duplicates,
    the system got to re-generate the userid again using the second letter of the person name.If the system check again, there is another duplicate, the system got to re-generqate again using the third letter and so on.
    For Example:
    Name: Kwok Fu Sing
    Company: ACE
    USERID generated: ACEZKUS

    First thing is that you should have DBA access to the database. Once you have it you can look at ALL_USERS to check if user already exists in the database. Your logic for generating unique user name should be able to handle if a user already exists in the database. I mean if generated user name is already in use then you may have to change the logic for creating unique user name and check again if it exists, you may have to do this more then once. Depending upon how many employees are there in the company and how many companies are there you may have to come up with quite a few logics for creating unique user name.

  • Getting unique userids

    I am getting a first and last name from the database. now i need to create a userid like lastname and first letter of the first name. I did this. Now i need to check if the userids are unique. If it is not unique i can add a 1 to it. Can anyone help me in this.

    I'm not sure I understand the question, what exactly do you need help with?

  • Very Urgent (Unique user Id scenario with Oracle LDAP and SSO)

    Unique user Id scenario.
    Our oracle LDAP repository is setup for customers to login from different companies. We have a requirement to integrate Oracle LDAP users with Oracle 9iAS portal 3.0.9 Single Sign On. I have two userid with same name on the LDAP from different company. For example userid jsmith from company A and jsmith from company B. Both userid do not exist on Portal Login Server. However, both userids will be created automatically in Login server when LDAP and Portal synchronize user list.
    1. How oracle portal will handle such scenario when portal requires unique userid?
    2. Can I customize portal login screen? For example when they login they can provide userid, passwd and domain name. Where domain name could be company name.
    Let me know if you need more information. Feel free to send direct e-mail also.

    Unique user Id scenario.
    Our oracle LDAP repository is setup for customers to login from different companies. We have a requirement to integrate Oracle LDAP users with Oracle 9iAS portal 3.0.9 Single Sign On. I have two userid with same name on the LDAP from different company. For example userid jsmith from company A and jsmith from company B. Both userid do not exist on Portal Login Server. However, both userids will be created automatically in Login server when LDAP and Portal synchronize user list.
    1. How oracle portal will handle such scenario when portal requires unique userid?
    2. Can I customize portal login screen? For example when they login they can provide userid, passwd and domain name. Where domain name could be company name.
    Let me know if you need more information. Feel free to send direct e-mail also. The scenario you describe is one addressed by Oracle9iAS Portal Release 2's capability to support multi-company hosting. In that scenario, each company has a separate branch of users represented in the directory information tree, as you describe. In this case, both users may have cn=jsmith, but the rest of the DN provides the distinguishing domain, e.g., cn=jsmith,dc=oracle,dc=com and cn=jsmith,dc=microsoft,dc=com.
    Version 3.0.9 also supported multi-company hosting, but it was only an internally used feature and one leveraged by a few early adopters. http://portal.oracle.com is one of our hosted examples of multi-company hosting on 3.0.9.
    In 'hosting' mode, the login screen displays a third entry field, as you describe, allowing the company name to be specified.
    For a supportable configuration, you should use Oracle9iAS Release 2 if you want to employ hosting mode. However, if you need some solution in 3.0.9, you can probably achieve something acceptable by making a slight modification to ssoxoid.pkb. I'm not entirely sure about this, because I'd have to dig into the code (which should be unwrapped, for customization such as this), but you could have users enter their names like 'jsmith@oracle' or 'jsmith@microsoft'. Then, within the ssoxldap.pkb authenticate_user function, you'd need to have the company name added to the base search base before doing the search. Then, once authenticated, the SSO server and Portal would create shadow entries which are unique 'jsmith@oracle', 'jsmith@microsoft'.
    Like I say, I'm not sure if the structure of the ssoxldap.pkb file will entirely support this, but that's your best bet until you get Release 2. There will be a 'Multi-Company Hosting Cookbook' provided with Release 2 that will provide the necessary supplemental information to activate hosting mode. You should understand that setting up hosting mode takes a bit more administration than the default single company mode.
    If your portal has already been running a while without the @company names then there will also be the issue of getting all the accounts already created moved over to the @company names.

  • Problem changing sld data supplier slddsuser to new userid in VA

    We are experiencing lockouts with slddsuser in the SLD so I planned to change all fo the userid's under sld data suppliers to a unique userid for each client.  I created a copy of user slddsuser in solution manager and made sure in the UME the new userid's had all of the same security.  When I change the userid in sld data supplier in the J2EE the HTTP fails with a 403 http error.  The CIM test also fails.  The message says to verify the gateway and that the sld service is running which they are since I can change the userid back to slddsuser and everything works fine.  What am I missing for security on the SLD side the new users are exactly the same as the slddsuser that works find??

    Hi
    One reason why no other user will work is because you would likely have to create any new users for each data supplier in the target SLDs UME
    Actually I noticed in another thread a useful suggestion - its possible one of the data suppliers reflects the wrong password
    or an old password for SLDDSUSER this could be causing the lock - unfortunately there is no easy way to identify this
    - perhaps you could check the SLD logs (now and in future) and/or increase the trace level to diagnose
    Best wishes
    Stuart

  • RUEI: Unique User Count in the Dashboard?

    Hi Guys,
    Would you happen to know how I could simply add how many unique user ID's were in our system within a 24 hour period? I just need to find a count of them to add to the dashboard. Any ideas?

    RUEI offers a reporing framework which can list you the unique userid which logged into your system.? It has to be custom report but it can be exported in any format.
    How ID gets identified is restricted to way you identify usernames in the ruei configuration.
    Syed

  • Create unique uidNumber

    Hi,
    we have different LDAP-servers. I want to create a unique UserID for our unix clients over all servers. I already stored the (imported) ID in global.MY_uid. But how to create a unique ID, when a new user is created? global.MY_uid is already made queryable in "IDM Schema Configuration.xml".
    My first idea was to issue a sql-statament like "select max(attr4) from userobj;". But this seems very complicated.

    I know, I know...
    But at them moment, I am completly clueless of how to do it.
    Is there a way to issue SQL-Statements to the repository? Like:
    com.waveset.server.Server _server = com.waveset.server.Server.getServer();
    com.waveset.repository.Repository _repo = _server.getRepository();But I can't find a method for using statements directly.

  • Autogenerated userid

    i want to create autogenerated userid
    like i created password;
    but problem is duplication of password is allowed so i don get much difficulty to implemement it
    & now when i am trying to generate autogenerated user id constraint is it should be unique
    here's code how i generate password automatically
    {color:#ff0000}+public String generatePassword() { // generate a semi-random password+
    Random rand = new Random(System.currentTimeMillis());
    int pwlength = 5 rand.nextInt(4);{color}
    +{color:#ff0000}+StringBuilder sb = new StringBuilder(); // generate ascii codes in the range of 48 - 57 (numbers), 65 - 90 (capitals) and 97 - 122 (lowercases){color}+
    {color:#ff0000}+while (sb.length() < pwlength) { // 48+ 74 = 122, the maximum value allowed.{color}
    +{color:#ff0000}+char chr = (char) (48 {color}+{color:#ff0000}rand.nextInt(74));{color}
    +{color:#ff0000}+if ((chr >= '0' && chr <= '9') || (chr >= 'A' && chr <= 'Z') || (chr >= 'a' && chr <= 'z')) {{color}+
    {color:#ff0000}+sb.append(chr);+
    +}+
    +}+
    return sb.toString();
    +}+
    {color}
    this code returns me one random password
    now i want to generate one random userid
    but it should follows following constraints::
    1>it should be combination of first 3 character from username and random number of 5 digit
    2> it should be unique
    3> once id generated by fun. then it should check that weather this id present in db or not, if its not present then its ok; & if present generate another
    4> repeate step until we didn find out any unique userid
    5> example
    if user name is john
    then his id will start joh then 5 digit number
    like joh12345 or joh00001 or joh56465 & so on...
    how should i implement this??

    While passwords should be strong and not easily guessed, I think userIDs should be easy for the end user to remember. They don't have to be strong. If an end user enters a bad userID and/or password, you produce an error message that says 'your userID and/or password is bad'. You dont say which one is bad since you will inform him if his guess of the userID is a valid customer's name.
    Here are the rules I suggest for userID:
    1: userID will consist of first name, period, last name. example: john.smith
    2: if there is already a userID by that, include his middle inital. example: john.a.smith
    3: if the userID still can't be generated because someone has the same middle inital (or he doesn't supply his middle initial), append the next unused number in a sequence to the name. Example: john.smith1, john.smith2, etc.
    I also suggest you let them generate their own password. An auto generated one will be very difficult to remember and they are more likelly to write it down to remember it (which makes it unsafe). Here is my recommendations to validate they created a strong passord:
    1: must be at least 8 char
    2: two letters must be upper case
    3: two letters must be lower case
    4: two letters must be numbers
    5: two letters must be any of the following special characters:
    !@#$% (or specify a set of any special characters you want)
    On the form, list the above rules he needs to generate a strong password and validate against it.

  • How to implement Oracle user/role security with Access front end?

    Hi,
    We have successfully migrated our Access database tables to Oracle 10g using SQL developer. We've recreated all the users and roles(i.e., access groups) in Oracle and granted rights to tables.
    In the Access front end database, in the Database window we have saved linked Oracle tables which replaced the Access tables. The forms, reports, queries run fine with the linked Oracle tables. All the linked table use one ODBC DSN to the Oracle database with the same Oracle user id.
    We need to be able to authenticate users into the Oracle database and RE-link the tables based on their own unique user id. By during so we can allow users to use the Oracle standard user id/role and system privileges to control select, update, ect. rights to the database.
    I've been able to use the VB code within Access to logon into the database with a unique id, but I have not been able to find out how to RE-link the tables to the unique user id using VB. There should be some way to relink tables dynamically, based on users login into the Access front end.
    I don't know a great deal about Access projects, but I do know with SQL server allows login into your Access project and link tables dynamically.
    Can someone give me some assistance or point me in the right direction?
    Thanks in advance,
    Larry

    We had one of our programmers here come up with a VB code solution for re-linking table within Access. However the relinking takes 3-4 minutes for 100+ tables.
    In an effort to help you understand the situation better, I will attempt to elaborate on the problem:
    We have an Access 2003 application which currently has a front end using Access(forms, reports, queries, & VB code) and a MS Access 2003 backend.
    We have migrated the backend tables to Oracle. However, we still have a need to maintain the front end in Access, since we have over 60 forms, 40 reports, 200+ queries in Access. Its easy to understand, we have a significant investment in the front end(Obviously, the plan is to migrate the front end also at some future date).
    In order to utilized the existing front end, we have to validate and modify the current front end connections to the new Oracle backend. One of the features of Access is that you can "link" tables and save the link for runtime. Each Access table can have its own link which is a separate ODBC/JET connection. As such, each separate link has its own userid/database information.
    The other issue with using the Access front-end is that Access utilizes a workgroup file to implement user and group security. The workgroup file contains all the users and which groups the users belong to in Access. Then within Access, you allow users access to object(tables, queries, ect) by their userid and or group. When users open an Access database with Access security enabled, they are required to log into Access. The login is authenticated by the workgroup file. Once, logged into Access, users have rights to Access objects based on their rights granted to their userid and groups they belong. The problem here is that when you remove the linked Access tables and replace them with linked Oracle tables, Access has knowledge about Oracle table rights granted to users; nor would you expect it to.
    The dilema is the disconnect between Access and the fact Oracle utilizes a similar but much more sophisticated security model. It creates users and roles(which are similar to Access groups), and again this is independent of Access security.
    Our solution was to still use the Access workgroup file security along with the Oracle security model. By using the Access userid and then creating a similar Oracle userid with similar table rights granted in Access, you could apply security within Access and also with the Oracle database.
    For example, a user BOB logs into Access via the workgroup file, using VB code, Access then establishes a Oracle connection logining into Oracle using the same unique userid BOB into Oracle.
    After connecting and validating user BOB into Oracle, then the Access tables are relinked to Oracle using the user BOB userid and table rights.
    This Oracle userid has been granted table rights specific for this userid.This allows the user BOB to use the Access application and still be authenticated into the Oracle database.
    The problem with this solution is that the relinking of the saved Access tables takes 3-7 minutes for about 100+ tables. This is not acceptable for users each time they log into the application.
    Our current alternative is to use one Oracle userid to login each user, and use Access form restrictions/security to allow/prevent users from updating/viewing data. Obviously, this is not the optimal solution in respect to security, but it at least allows us to control access to the data(via the forms) by using one logon required for each user, and quick startup time for the application.
    I understand SQL server does a better job in integration, but we use Oracle which is what I am trying to work with.
    Larry

  • Network home folders, collaboration sharepoint and Microsoft Word 2008

    I'm hoping someone who knows how Microsoft Word 2008 works on network volumes can shed some light on our situation.
    We run a small managed network with about 15 leopard clients and a leopard server. We've got two sharepoints, a "homes" share for network home folders, and an "Office" share with our shared office document folders.
    Several times a week, users will encounter a situation where Microsoft Word 2008 will claim that a file is open by another user, or that the file can be opened in "read only" mode, even though the file is not in use. Naturally, the problem cannot be replicated when I am present.
    ### My Hypothesis ###
    My users are in the habit of quickly borrowing machines from other users to pull up documents in the "office" share by using the "connect as" button. So, for example, userA is logged in to her machine (and is thus connected to the network home folder on the server). userB comes along and borrows her machine -- without logging out, will connect to the shared office folder, pull up and edit/print a document, etc. We're not currently auto mounting the office share.
    I know that Microsoft Word creates lock folders located in the .TemporaryItems folder at the root level of the "office" share. The folders are named "folder.xxxx", where xxxx is the userid of the account that created the lock folder. Everyone uses a network account, so everyone has a unique userID. If I list the .TemporaryItems folder using the CLI, i can see lock folders that are several days or a week old. So Word doesn't seem to be cleaning up after itself immediately, at least not always.
    So my question: when userB connects to the office share on a borrowed machine (logged in to the client machine using the network home folder of userA), is it possible that word will now create lock folders for userB, and will be unable to clean up lock folders created by userA?
    Anyone have other ideas for investigating the "file in use" problem?

    Switched user back to the network home folder and adjusted the MS Word preferences so that the autorecovery files would be stored on the local client machine. There doesn't seem to be a comparable setting in the Excel preferences.
    My initial testing suggests that this has reduced how often this problem occurs, but has not eliminated it. I tested by repeatedly opening and closing a couple of different word files in rapid succession -- i was able to replicate the "file opens as read only" problem occasionally.
    I've talked to Apple server support about this issue. While they were helpful, they didn't have an explanation or solution for this problem. There are a number of postings in the microsoft mactopia discussion boards site where people report similar problems.

  • Can i create an instance of ArrayList ?

    hi ,
    I need to store first name, last name etc in an ArrayList for a unique userid. And i have to do it for few userids. on successful login of the user ( with unique userid that matches with the one in the arraylist), i need to retrieve user details (first name, last name etc) from that arraylist and display in jsp file.
    Could u please tell me:
    1. how do i go about doing it?
    2 .Can i create an instance of ArrayList and use .add() method to add details ?
    3. can i write some java code in jsp without using scriptlets ?
    Thanks in advance,
    Sanlearns

    Hey thanks so much for the reply.
    Let me tell you the exact scenario. I'm actually developing a struts-application. Hope I can get some help here too.
    I have:
    1. login.jsp-where user logs in.
    -I have a userid and a password as default values for each unique user.
    Where should i store these details -in HashMap??
    -How can I display error messages if userId/passWord is invalid on login.jsp page ??
    2. confirmation.jsp-on successful login, he's shown his details:
    YOur first name: .........
    Your last name: ........ etc.
    -Here I can't use bean:write tag to read from form-bean.
    - how do i display it here without using a scriptlet ?
    3. LoginAction.java
    -Here i will get userId and passWord from LoginFormBean.java setter
    and getter methods.
    -For all validations' results, should i call a boolean getUserDetails() method from form-bean, wherein i can map values(first name, last name etc ) to each key (userid) ?
    i can use methods like:
    if (isValidUserId && isValidPassWord )
    LoginValidateUtil.getUserDetails();
    return mapping.findForward("success");
    But, can I assign many values to a single key using Map ?
    4. LoginFormBean.java
    -Here should I have to use set/getUserDetails() ?
    -If so, how do I use Map there?
    I want to have userId as the only key to which i can map values and not password.
    5. LoginValidateUtil.java
    -Here all validations are defined and boolean result is passed to LoginAction.java.
    Hope you got what I meant.
    Please tell me if i am right in this approach...
    Thanks in advance,
    sanlearns

  • Biller Direct Electronic Bill Payment and Pool User

    Hi,
    We have an internet front end system that will encapsulate the Biller Direct pages. This system contains the user management engine.
    Biller direct can utilise pool users to connect the web server to biller direct. Would it be possible to have bills viewed and paid for using a pooled user rather than individual unique userids.
    I was then planning to implement the logic to restrict viewing by customers in the web server.
    Thank you.

    Re: Bill Payment Fees
    I do not understand why I have to pay a fee of $2 to pay my account at the post office. You are using a bullying tactic to make me do something that I am not comfortable with. You will charge me a late fee if I do not pay by a certain date but you do not even consider dropping the $2 fee when I pay my account within 2-3 days of me receiving my account at the post office. What has happened to loyalty to the customer. I have had an account with you for many, many, many years.
    I pay all my bills at the post office (house rates, water rates, power, gas and even my home phone) and am not charged for any of these. It is so, so wrong. I have rung and talked to someone but got no satisfaction. I am so upset about this. It is not just the $2, but the principle of it all. It is soooo wrong.

  • How to prevent from inserting two similar values into DB?

    Hi,
    I wanted to know how we can prevent from inseting two similar values into the database, e.g the user id which should be unique. Here is some sample code, Please help me.
    String s10 = req.getParameter("T10");
    String s11 = req.getParameter("T11");
    rs = st.executeQuery("select * from Register where userid='"+s10+"' ");
    if(rs.next())
         sos.println("Sorry the user already exists");
    else
    int x = st.executeUpdate("insert into Register values('"+s1+"','"+s2+"','"+s3+"','"+s4+"','"+s5+"',"+s6+","+s7+",'"+s8+"','"+s9+"','"+s10+"','"+s11+"')");
    Thaks in advance
    Uma               

    Hi reddy
    Your code works will be perfect with slight changes whucah are as below:
    String s10 = req.getParameter("T10");
    String s11 = req.getParameter("T11");
    rs = st.executeQuery("select * from Register where upper(userid)='"+s10.toUpperCase()+"' ");
    if(rs.next())
    sos.println("Sorry the user already exists");
    else
    int x = st.executeUpdate("insert into Register values('"+s1+"','"+s2+"','"+s3+"','"+s4+"','"+s5+"',"+s6+","+s7+",'"+s8+"','"+s9+"','"+s10+"','"+s11+"')");
    In the above Query we will get a unique userids it may be smallcase or Uppercase
    This will help u
    Cheers
    Rambee

  • Relation ship between table USR02 and ADRP

    Hi all,
    My requirement is to dispaly the userid , username, address and email id.
    iam unable to find the realtionship  between table USR02 ( which maintains userid's) and ADRP( which has user name, etcs).
    Please tell the how to fetch the name , address and email id data for perticular userid
    urgent.
    thanks in advance
    ramprasad

    Using userid U can get the personnel number from PA0105 ..
    pass this PERSNUMBER to ADRP and get other details.
    select pernr from pa0105 .....
              where USRID = USR02-USRID.

Maybe you are looking for

  • Cannot find line where veiw,or bookmark is on top of page

    very top of page has the word veiw and bookmark but the line has disapeared

  • 9.0.3: JCLoginDialog not showing

    Hi. If I am creating a new JClient Form with the wizard in and select 'Generate Login Dialog' the Dialog pops up like it should in 9.0.2. If I do the same in 9.0.3, the Login Dialog doesn't pop up. Is this a bug, or what? thanks

  • Drop Down Menus (Can't Get it Right)...

    hi everybody: i'm trying to build a drop down menu for a site's navigation. i've searched google and all the flash forums i can think of, and i keep getting the same results. i've tried the "invisible button" method -- whereby rolling over an invisib

  • Phone shuts down when deleting photos, please help

    WHen I connect my iphone to the computer, I can get the pictures from the camera roll with no problem. If I choose to delete the photos after transfer, or If I manually select the photos, and then press delete, the phone stops responding, shuts down

  • Won't Boot internal Start Up Disk

    Hi all, Today I had to do a hard shut down after my 2009 mac book pro froze. After this, the computer would not boot up again. I get as far as the grey screen, with the rotating "gear icon". It stays on this screen indefinitely. I tried booting to th