Changing db2 mainframe password from java

Hey guys
Is there any way we could change the DB2 password from java program.
thanks,
Balaji

My current appliccation has a swing based front end.
From this front end we access DB2 DB which runs on mainframe.
Based on user name and password authentication we determine the screen access for the users. Now the problem is there are users who dont access the DB directly other than for changing the password .
All other details they need they access from our application.
So if it is possible for them to change the password also from our application then they need not directly connect to the data base. Hope i am clear.
Thanks
Balaji

Similar Messages

  • How to change a date value from "java.util.Date" to "java.sql.Date"?

    Hi all,
    How to change a date value from "java.util.Date" to "java.sql.Date"?
    I m still confusing what's the difference between them.....
    thanks
    Regards,
    Kin

    Thanks
    but my sql statement can only accept the format (yyyy-MM-dd)
    such as "select * from xx where somedate = '2004-12-31'
    but when i show it to screen, i want to show it as dd-MM-yyyy
    I m using the following to change the jave.util.Date to str and vice versa. But it cannot shows the dd-MM-yyyy. I tried to change the format from yyyy-MM-dd to dd-MM-yyyy, it shows the wrong date in my application.
         public String date2str(java.util.Date thisdate)     {
              if (thisdate != null)     {
                   java.sql.Date thissDate = new java.sql.Date(thisdate.getTime());
                   return date2str(thissDate);
              }     else     {
                   return "";
         public String date2str(java.sql.Date thisdate)     {
              if (thisdate != null)     {
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   return sdf.format(thisdate);
              }     else     {
                   return "";
         public java.util.Date str2date(String thisdate)     {
              String dateFormat = "yyyy-MM-dd"; // = 1998-12-31
              java.util.Date returndate = null;
              if (thisdate != null)     {
                   SimpleDateFormat dateFormatter = new SimpleDateFormat(dateFormat);
                   try {
                        returndate = dateFormatter.parse(thisdate);
                   } catch (ParseException pe) {
                        System.out.println (pe.getMessage());
              return returndate;
         }

  • Changing db2 sid password

    Hi,
    Recently i just changed db2<sid> password in AIX using passwd command and also i changed the password in r/3 (tcode dbacockpit under database connection)
    After that i looked at the etc/security/failedlogin file and i saw a lot of db2<sid> entries.
    Can anyone enlighten me which part i have missed out or done wrongly?
    Thanks a million

    Hi,
    Changing the db2<sid> password will not require the        
    update of other users or any other change to reflect the changed         
    password. which would be needed if you change the passwords of
    <sid>adm and sap<sid> (these would need to be updated via dscdb6up)
    But if you change the db2<sid> password
    it will not affect the running of the SAP instance as SAP      
    does not use this user to connect.                                       
    Do you see alot of entries in the db2diag.log of
    Password validation for user db2<sid> failed with rc = -2146500507                                                                               
    validation for user db2<sid> failed with rc = -2146500507 in the              
    db2diag.log file means that the "Password does not belong with                
    specified user id" after DB2 SERVER password was changed for instance         
    owner.                                                                               
    It will not harm the system but some user or script is still using the        
    old password to connect and it generating this entry.  It would be very difficult
    to track down exactly what is tyring to connect as it is not an SAP application.
    regards,
    Paul

  • Junked old macbook for a new one. changed apple id password from a different mac. i want to login and it asks for name and password. no matter what i type i cant seem to login. any way help?

    junked old macbook for a new one. changed apple id password from a different mac. i want to login and it asks for name and password. no matter what i type i cant seem to login. why cant i just enter my apple id and password. or is there a way to change whatever name and password are on the new one from another mac so i can login. anything helps...thanks

    Just open System Preferences>Users & Groups and unlock the preference pane with your root password.
    Set the New Account to be an Administrator and fill in the rest of the data and then click "Create User".
    I would suggest using this user to be YOU with admin capabilities. I wouldn't use the root user - too much damage could occur if you're not sure what you're doing. If you have files, etc., that you want to move to this account, simply but them in the Shared folder - or if you 'rescued' some old files and the like from your 'trashed' MBP, you can put them in your NEW admin account folders.
    Hope I've explained myself well - call back with any questions!
    Clinton

  • Change SAP BI Password from BO Client Tools / Infoview, SAP Authentication

    Hi,
    We are using SAP BI BO Integration Kit (BO XI 3.1, SAP BI 7.0) & able to use SAP BI Queries with WebI, Xcelsius etc.
    For a user group, we would be providing only Infoview access (using SAP Authentication). This means we would not want to install any BO Client Tools, SAP GUI or SAP Integration Kit Client, on user desktop.
    We are faced with a issue - How does the user change password from Infoview (this is an SAP BI User ID used to login from Infoview).
    Initial Password of SAP BI User cannot be changed from Infoview, since it doesnot prompt for changing the Initial Password.
    Any ideas how to handle this situation.
    regards,
    Rajesh K Sarin

    Hi Erwin,
    no. Also within BI4 you are not able to change your SAP password.
    The Workaroung of Ingo is very suitable using SAP GUI for HTML.
    You can vote this idea on idea place:
    https://ideaplace.brightidea.com/ct/ct_a_view_idea.bix?c=BB5523E4-062F-4420-B35F-0B1F0D4769A9&idea_id=CBAD2E43-C21E-4809-A0B0-CFD3B9551A41#
    Regards
    -Seb.

  • DB2 Stored Procedure from Java-JDBC

    Hi All,
    I am using DB2 stored procedure which have been written in COBOL. I have two types of stored procedures. First types of stored procedure takes IN parameter and returns OUT parameter. These stored procedures are working fine. The second type of stored procedure takes IN parameter and returns a CURSOR. According to Database team (who wrote these stored procedure) claims that they can see data in a cursor when they test these stored procedure directly in the database. However, when I run these stored procedures from Java code it returns NULL ResultSet. Here is the code:
    public SearchResult getAllBenefitHEDType(SearchParameter searchParam) throws DAOException {
    log.debug(" getAllBenefitHEDType method - entering ");
    HashMap searchParametersMap = searchParam.getHashMap();
    SearchResult searchResult = new SearchResult();
    String type = (String) searchParametersMap.get(UDFConstant.LOOKUP_SEARCH_TYPE);
    HashMap resultParametersMap = new HashMap();
    ArrayList resultSetDTO = new ArrayList();
    try {
    conn = this.getConnection();
    conn.setAutoCommit(false);
    System.out.println("getAllBenefitHEDType Step 1");
    CallableStatement cs = conn.prepareCall("{call TEST.APS003(?)}"); // Stored Procedure with one IN parameter.
    cs.setString(1,type);
    boolean retVal = cs.execute(); // this should return true if ResultSet is available.. in my case it is returning false.
    // I tried with getting the Object
    ResultSet rs = (ResultSet) cs.getObject(1); // this should give me a valid result set ... in my case I am getting null
    if (rs!=null) {
    System.out.println("getAllBenefitHEDType Step 4A Result Set Not Null");
    } else {
    System.out.println("getAllBenefitHEDType Step 4A Result Set Is Null");
    // I tried getting the resultset
    ResultSet rs1 = cs.getResultSet(); // this should give me a valid result set ... in my case I am getting null
    if (rs1!=null) {
    System.out.println("getAllBenefitHEDType Step 4D Result Set Not Null");
    } else {
    System.out.println("getAllBenefitHEDType Step 4D Result Set Is Null");
    while (rs.next()) {
    System.out.println("getAllBenefitHEDType Step 5");
    LookupDTO lookupDTO = new LookupDTO();
    // the following code populate the Lookup DTOs from ResultSet.

    A few comments...
    1) Creating tables, particularly tables whose names seem to imply that they are temporary tables, on the fly in a stored procedure is a bad idea. That is not the way to work with Oracle, though it is a common practice in other databases like SQL Server. There is undoubtedly a better way to do this in Oracle if you can explain what you're trying to accomplish from a business standpoint.
    2) If you are going to use dynamic SQL, you almost always want to use bind variables, not literals. One of the quickest ways to kill an Oracle database's performance is to not use bind variables.
    3) As has already been mentioned, assuming FH_INICIO is a DATE column, you need to put an explicit TO_DATE around your strings in order to convert them to dates. Otherwise, Oracle's implicit cast depends on the session's NLS_DATE_FORMAT, which is likely to be different in different client applications and from different client machines.
    Justin

  • ORA-28183 when connect proxy user with password from java

    1. Create user on database 10.2.0.1.0
    create user scott identified by tiger;
    create user jeff identified by secnt;
    grant connect, resource to scott;
    grant create session to jeff;
    alter user jeff grant connect through scott authenticated using password;
    2. Try to open proxy session from java
    DriverManager.registerDriver(new OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@//db.garage:1521/ILINK", "scott", "tiger");
    if (conn != null && conn instanceof OracleConnection) {
         Properties properties = new Properties();
         properties.put(OracleConnection.PROXY_USER_NAME, "jeff");
         properties.put(OracleConnection.PROXY_USER_PASSWORD, "secnt");
         ((OracleConnection)conn).openProxySession(OracleConnection.PROXYTYPE_USER_NAME, properties);
         ((OracleConnection)conn).close(OracleConnection.PROXY_SESSION);
    conn.close();
    3. Got the following error for step 2
    Exception in thread "main" java.sql.SQLException: ORA-28183: proper authentication not provided by proxy
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
         at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:647)
         at oracle.jdbc.driver.T4CConnection.doProxySession(T4CConnection.java:852)
         at oracle.jdbc.driver.PhysicalConnection.openProxySession(PhysicalConnection.java:1548)
         at ch.tie.cluster.Test.run(Test.java:30)
         at ch.tie.cluster.Test.main(Test.java:19)
    4. If i grant connect without using password like:
    alter user jeff grant connect through scott
    everything is fine, but i need password authentication.
    Thanks in advance.

    did you try using the oci driver?

  • Unable to change domain logon password from Windows 8.1 system

    We are facing a new problem in our domain. Users working on windows 8.1 platform are not able to change the password and getting an error "the security database on the server does not have a computer for this workstation". I tried deleting the
    computer from domain and rejoined to the domain but did not help.
    We are running Windows 2008 standard 64 bit Domain Controller and Active Directory functional level is Windows Server 2003. Please help with a solution.

    Thanks Marius, but we do not have R2.. It is just Win 2008 Std with SP2
    The same applies to Windows Server 2003 and Windows Server 2008 as well so far I know, you have to call Microsoft and ask for back-port hotfix. Can you check if the password has been updated for the krbtgt account?
    You can use repadmin lik this, just replace the DCNAME and the DN to much your own environment:
    repadmin /showobjmeta eur-fle-dc02 "CN=krbtgt,CN=users,DC=e
    r,DC=corp,DC=chrisse,DC=com"
    35 entries.
    Loc.USN Originating DSA Org.USN Org.Time/Date
    Ver Attribute
    ======= =============== ========= =============
    === =========
    7202 dc95de70-859e-4f39-a489-73380dd1896f 12299 2005-03-19 16:40:16
    2 unicodePwd
    Note "2" for unicodePwd it means that the password for the account has been updated 2 times.
    If the above doesn't apply to you, have you changed any ACLs recently? and dose it work on Windows 7 for example?
    Enfo Zipper
    Christoffer Andersson – Principal Advisor
    http://blogs.chrisse.se - Directory Services Blog

  • TS3899 After changing my gmail password from my laptop, I can no longer access gmail on my iPhone.

    I've entered my new password many times and exchange tells each time that either my account name or password is incorrect.  I deleted my account from exchange and re-set it up, no help.  I rebooted the phone, no help.  Gmail works just fine on my laptop.  Please help.
    IPhone 4s, iOS7.1

    Sounds like you restored your phone as new.  If you follow all the steps, there a section that allows you to restore from a backup either through icloud or itunes.
    You do have a backup of your phone right?  If you don't then all is gone, but you can sync back your apps and music.

  • Executing db2 import statement from java

    we have developed an web application using J2EE technology on websphere and DB2 as a backend.
    I have to now develop a utility for data uploading from Excel to DB2. we can do it using IMPORT statement now i want to know is it possible to execute IMPORT statement from JSP/ Servelet and using javabeans.

    Yes, it is possible :-)

  • Cannot make changes or remove password from sheet.

    I have a spreadsheet in the newest version of Numbers.
    The size is approximately 20 MB
    I cannot edit the spreadsheet in any way on the Mac because the whole application crashes.
    I can (slowly) edit the file on iOS devices, but the changes do not always save.
    I had originally placed a password on the file, but decided to remove it. After I do this I get an error on iOS devices that "Spreadsheet cannot be opened".
    This is a comedy of errors. Has anyone else seen this or have a Decent suggestion? Is there any way to get Apple to look into this mess?

    I have "restored" my Nano via the button in iTunes and it correctly loaded everything back onto the Nano. There was no change in the problem I'm having. When viewing the contents of my Nano in iTunes everything is gray and cannot be deleted and I cannot add content to the Nano.
    Switching the lock button on the Nano has no affect but I do see the lock on the display go on/off so that appears to be working properly. All functions of the Nano seem to be working properly. I can play music, pod casts, shake to shuffle. It's just not working with iTunes.

  • How can I change the desktop wallpaper from Java?

    Hello!I'm coding an image viewer and I need to be able to set an image as an desktop wallpaper.What ways can be used to do this?Thank you

    If Java does have a platform-independent way of doing this, it'll be in the [JDIC (Java Desktop Integration Components)|https://jdic.dev.java.net/] library

  • HT4865 I need to change my iphone password from my iPad

    I tried resetting my password on my iphone and when I went to use it the password won't work and my phone locked me out. I need to reset my password through my iPad. How do I do that?

    Go to My Apple ID and click Manage your account
    Apple ID FAQs  >  http://support.apple.com/kb/HT5622
    Apple ID Support  >  http://www.apple.com/support/appleid/

  • How to change user password from default realm programaticaly

    Hello,
    I would like to know if there are any ways to change a users password from a file
    realm through java classes ie . programaticaly.

    Thank you for the support.
    After looking at the code, I noticed RealmManager is not documented in the BEA
    Javadocs. Am I missing something or is it not documented. Lot of other methods
    also not documented. Do you have the latest Javadocs?
    Thanks
    John
    "Tom Moreau" <[email protected]> wrote:
    >
    See message #4589 - it posts the code magic needed
    to change the password. The caller doesn't have to
    be aware of which realm is being used - that's taken
    care of for you.
    -Tom
    "John M" <[email protected]> wrote:
    Hello,
    I would like to know if there are any ways to change a users passwordfrom
    a file
    realm through java classes ie . programaticaly.

  • Problems in Changing LDAP (AD) Initial Password from Portal

    Hello ,
    We are using EP 7.01 SP 05 with Microsoft AD as our user data store (flat structure).
    For newly created users on AD, we are wanting them to be able to change their initial passwords from portal (on their first logon).
    SSL is set up between EP and AD.
    The user we are using to access LDAP has write privileges.
    We are using a standard configuration file (writeable version) (dataSourceConfiguration_ads_writeable_db.xml)
    We are able to modify users from User Administration console (including password change) without any problem.
    However, there are two problems we are facing:
    1. If the flag "User must change password at first logon" is set on AD/LDAP, then on Portal the user is not getting prompted for changing password - and User authentication failed
    2. If the flag "User must change password at first logon" is NOT set on AD/LDAP, then - User is getting prompted to change the password" - however password change is not going through successfully - Error says - "Missing".
    From logs I can see the following error:
    #1.5#0050568767DE006B0000000700005D7C00048EC433D5B0FC#1282873241046#com.sap.security.core.persistence#sap.com/irj#com.sap.security.core.persistence.[cf=com.sap.security.core.persistence.datasource.imp.LDAPPersistence][md=changePassword][cl=64495]#Guest#0#SAP J2EE Engine JTA Transaction : [044ffffffd35700451]#n/a##19ae55e0b17c11dfb0d00050568767de#SAPEngine_Application_Thread[impl:3]_23##0#0#Error##Java###Can not change password
    [EXCEPTION]
    {0}#1#javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 19 - 0000052D: AtrErr: DSID-03190F00, \#1:
    0: 0000052D: DSID-03190F00, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 9005a (unicodePwd)
    ]; remaining name 'cn=portal test'
    at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3010)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2943)
    at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2749)
    at com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1449)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:255)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:172)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:161)
    Can any one pls suggest what is this error about and what I am missing.
    Thanks ,
    Shanti

    Hello All,
    Thank you for your time and valuable replies.
    I got rid of the "Missing" error and now I am one step away from the solution.
    Now I am at a stage where: (for a user with initial password on LDAP)
    1. In AD if "User needs to change password on next logon" flag is NOT set - user can successfully logon to portal. (without being prompted for password change)
    2. In AD if "User needs to change password on next logon" flag is set - then user cannot logon to portal - I get User authentication failed error.
    I have went through a lot of discussions around this topic on SDN and different SAP Notes. I have tried to maintain UME Security policy as close as possible to LDAP (I cannot make it exactly same due to some differences in LDAP and UME).
    However, when and administrator can change passwords from UME successfully without any problem - it means that:
    - Security policy is being met
    - Service user used to communicate to LDAP has all the required access
    The only missing piece of the puzzle is how to enable the users to be able to change their passwords (with initial or expired passwords).
    According to Note 865399 - the default value for The property ume.ldap.access.set_pwd is TRUE.
    Also the property ume.ldap.access.pwd.via.usercontext can only be TRUE when ume.ldap.access.set_pwd is set to FALSE.
    So, I have tried setting the following without any success:
    <ume.ldap.access.pwd.via.usercontext>true</ume.ldap.access.pwd.via.usercontext>
    <ume.ldap.access.set_pwd>false</ume.ldap.access.set_pwd>
    Thanks,
    Shanti

Maybe you are looking for