What are the differences between connect reset, disconnect current, and quit commands in db2? Or which one can really disconnect after connecting to db2?
Connect reset literally means "Connection reset ";
Disconnect current literally means "disconnecting the current connection ";
Both of the preceding commands can disconnect the database;
Www.2cto.com
Quit exits the interactive mode, which is equivalent to exiting the interactive mode by using Ctrl + C. After using this command, it only exits the interactive mode and the database connection is not disconnected. If you enter db2 to enter the interactive mode, you can continue to use the previous connection for SQL operations (provided that the connection is not disconnected using the connect reset or disconnect current command ).
I have been using the quit command all the time. From the test results, this is a misuse that I did not understand before, so I should record it. The correct method is to use the connect reset or disconnect current command to disconnect and then quit.
After connecting to the database, run the connect reset command:
Www.2cto.com
After connecting to the database, run the disconnect current command:
After connecting to the database, run the quit command:
Www.2cto.com
Addition: db2 terminate-disconnect from the database.