Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change password of a database in DB2 software of IBM?

However, it seems very trivial - How to get the current username of a database in DB2 software in IBM; But, trust me, when it comes to entering the database username and password while connecting DB2 with eclipse, you might have to wait for a time which is tediously long. Let's get straight to the point:-

This is how you get the username of a database in DB2.

  1. open DB2 Command Line Processor .
  2. Connect to your database:-

         db2 => connect to <database_name>
    
  3. Enter this query in db2 clp:-

         db2 =>  SELECT CURRENT USER FROM SYSIBM.SYSDUMMY1
    
  4. You'll get the current user name of the current database that you have accessed.

Now, the main problem is :- How to get / change the password if one has forgotten the password. And, What is the difference between database password and the one that i entered while installing DB2 ?

like image 848
ypahalajani Avatar asked Oct 15 '25 18:10

ypahalajani


2 Answers

DB2 does not have its own set of IDs and passwords; it relies on the operating system to perform authentication. So your ID and password are what you used to log in to Windows (or Linux, AIX, etc); and you change your password as you do normally on each platform.

The password you entered during installation is for a different ID - DB2 created a new user on your local machine. On Windows the ID is called db2admin by default.

like image 155
Ian Bjorhovde Avatar answered Oct 18 '25 09:10

Ian Bjorhovde


db2 "CONNECT TO <database> USER <userid> USING <password> NEW <new_password> CONFIRM <new_password>" 

http://www-01.ibm.com/support/docview.wss?uid=swg21984232

like image 28
Dahar Youssef Avatar answered Oct 18 '25 09:10

Dahar Youssef



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!