Database disconnection in db2

Source: Internet
Author: User
Tags connection reset


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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.