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.
Connect to your database:-
db2 => connect to <database_name>
Enter this query in db2 clp:-
db2 => SELECT CURRENT USER FROM SYSIBM.SYSDUMMY1
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 ?
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.