don't connect by default in datagrip
I love datagrip… but the whole projects/files/ide stuff I'm not interested in at all - For me, it's a tool to list all the databases I know in the organisation and connect to them quickly. And there are a lot of them.
I start up datagrip - have like 30 databases on the tree on the left for when I want to access them, but some databases I might access once a year - if that. Some databases I might _never_ access - I just add them there just in case one day I might need to quickly, so I don't have to go and find out how at that point.. I have datagrip always running - and I want all my databases there, so that everything is just a click away - but… and here's the key point… I don't want datagrip accessing them unless I do click on them. It uses lots of resources - and it's quite annoyingly slow when you start up.
Is there any way of telling datagrip “do not ever ever ever connect to a database in my project unless and until I actually click on it?"
For me at least - there's actually no database I _would_ want it to connect to automatically.
Please sign in to leave a comment.
Hi,
I have a similar setup with lots of different data sources configured for various databases, and none of the connections are initiated until I select a particular database and click ‘Refresh’ in the Database tool window. The behavior persists between restarts, so I don't see how you can have any issues with this.
Is the actual problem that the IDE is slow on startup and loading the list of all data sources in the Database tool window? Or that some of the data sources initiate connections to databases on their own?
Sorry for the necro, this is the closest to my problem I have found.
Arina Efremova my use case is the following: we have a dev, a test and a staging environment; and sometimes a local database. I would like to have a project where I can have all these four connection set up, but not automatically connected, because mostly I would need to work on the dev database, but sometimes it's not available (because of maintenance), in which case I start the local database, which in turn is only available then. I would only like to connect to the test or staging environment in a few occasions to check something, but I don't want to set up and then remove the connection each time, just to check if a specific row is correct in the DB.
So I would like to set up the connections, but not automatically connect every time I load the project, only when I actually need to access one of the connections. And I do not want to juggle four different projects, with their own settings and environment and everything.
Hi Adam Ladanyi
You can have as many data sources set up in the IDE as you like. The actual connection happens only after you press the “Test connection” button in data source settings, or “Refresh” button in the Database Explorer.
If you are done with the current session, you can press “Deactivate” to shut down the connection. The data source will remain in the list, but in a disconnected state.
Inactive connections are not initiated automatically after you launch the IDE and load the project.
Moreover, you can enable the option to auto-disconnect in N seconds for any configured data source. You can also disable automatic sync with the database so that you can do it yourself in a controlled manner.