How do I change the default schema in DataGrip?

Completed

The help article on schemas talks about changing the default for the session but I cannot find how to change the default for the server. Even in the screen shots on the help page you can see "(Default schema) in light grey text next to the name, but there's no way to change it!

0
8 comments

I found the answer just after posting this question, from this question/answer by Brandt Elison (thanks!) : Cannot change the default schema from guest to dbo MS SQL

When you set a database on the "Data Sources | General" tab it becomes the "default" database. It would be nice if the documentation mentioned this! :)

0

Click the <schema> list and select the schema that you need. Select a data source that you want to modify. On the General tab in the Database field, type the name of a schema that you want to use as default.

mybpcreditcard

0

I have also same error have any solution for that.

 

 

OneVanilla

0

Alievserega17 Thanks, I discovered the answer not long after posting my question.

Chanelnicoleyu97 See my answer and the answer from Alievserega17 for the solution.

0

Thanks a lot @Anthony for solutions i was facing same issue past few days finally now issue resolved .

OneVanilla

 

0

but using Database field in DataSource config page - you make this database to default for all databases under datasource. and when you make some changes in table-view - the request for update will use that database, not the current database you connected to.

in old DataGrip there is no problem with this, why they changed it, can't understand

0

Agroghkov,

Could you share your SQL and IDE logs since it works fine for me. IDE correctly switches between schemas.


 

Make sure you set Switch schema to Automatic

0

Thank you for sharing this information..

0

Please sign in to leave a comment.