DISCONNECT
Closes a connection to another Vertica database that was opened in the same session with CONNECT TO VERTICA
.
Closing your session also closes the database connection. However, it is a good practice to explicitly close the connection to the other database, both to free up resources and to prevent issues with other SQL scripts that might be running in your session. Always closing the connection prevents potential errors if you run a script in the same session that attempts to open a connection to the same database, since each session can only have one connection to a given database at a time.
Syntax
DISCONNECT db‑spec
Parameters
db‑spec |
Specifies the target database, either the database name or |
Privileges
None
Example
=> DISCONNECT DEFAULT; DISCONNECT