In ths blog we are exploring How to Managing connection sessions In DataGrip
The Services tool window automatically pops up when you run something related to a service (for example, a query or refresh a table state). Alternatively, to open the Services tool window, click View | Tool Windows | Services. For more information about the Services tool window.
1. Data source node.
2. Disconnected session.
3. Connected session.
4. Session clients.
When you connect to a database server from the IDE, DataGrip and the server establish a session to exchange information. The session is a wrapper that stores information about the connection (connected or disconnected), transaction control (automatic or manual), the DBMS_OUTPUT state for Oracle (enabled or disabled), and other settings.
A session has two states: connected and disconnected. When you run a query to a database or refresh an object state, the session connects. A small green circle indicates that communication between the IDE and a data source is active.
If you close DataGrip and open it again, all your sessions will be available in the Services tool window, but they will be disconnected.
A session node may include a different number of session clients. A session client is any entity that needs to communicate with a database. It can be a query console; an SQL file; a table, a view or any other object opened in the data editor.
The following table includes basic actions that you can use to work with sessions.
|Create a connection session to a data source
|Attach to an existing connection session
|Detach a connection session
|Rename a connection session
|In the Services tool window, right-click a session and select Rename Session.
|Move a session or a data source to a separate tab
|In the Services tool window, right-click a session or a data source and select Show in New Tab. To revert this action, close the separated tab.
|Close all connection sessions
|In the Services tool window, right-click a data source and select Close All Sessions.
Configuring session options
Set a time zone for a session
1. Open data source properties. You can open data source properties by using one of the following options:
o Navigate to File | Data Sources.
o Press Ctrl+Alt+Shift+S.
o In the Database Explorer (View | Tool Windows | Database Explorer), click the Data Source Properties icon .
2. Select a data source that you want to modify and click the Options tab.
3. In the Time zone field, start typing the time zone that you want to use.
4. Apply settings and click OK.
Change a data source and a connection session
1. Detach a file from the current connection session. To detach the file, click Detach Session from the Sessions list.
2. From the list of dialects, select another dialect.
3. From the Sessions list, select a connection session of this dialect.
Helical IT Solutions
Best Open Source Business Intelligence Software Helical Insight is Here