Multiple choice technology databases

Which of the following DB2 command can be used to change bob’s password?

  1. CHANGE PASSWORD USER bob OLD bobpass NEW newpass

  2. CONNECT TO sample USER bob USING bobpass NEW newpass

  3. CONNECT TO sample USER bob USING bobpass NEW newpass CONFIRM newpass

  4. No DB2 command can be used to change the password of a user ID

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In DB2, you can change a user's password during connection using the syntax: CONNECT TO database USER username USING old_password NEW new_password CONFIRM new_password. This verifies and updates the password in the operating system or external security manager.