Datagrip连接数据库时报ORA-00942: 表或视图不存在

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34033853/article/details/88858182

解决Datagrip连接数据库时, 报ORA-00942: 表或视图不存在的问题

问题

  1. 输入了正确的用户名, 密码, 选对了TNS对应的名称, 点击了Test Connection之后, 显示successful
  2. 点击Apply, Ok之后, Datagrip开始连接数据库, 读取数据元信息, 结果提示我 ORA-00942: 表或视图不存在
  3. ???
  4. 对比了数据库用户名, 密码, TNS, 数据库IP, SERVICE_NAME, 全部正确呀!
  5. 也查看了Dategrip的日志, 无果.
  6. 查阅了Google和官方文档, 终于解决了

解决

在数据源配置页, 选择如下这个, 勾选之后, 再重新连接一下.
options->Introspect using JDBC metadata

我当时就是勾选了这个之后, 重新连接后, 就好了.

贴一下官方解释

You may want to select this checkbox (if available) to try to fix the problems with retrieving the database structure information from your database (e.g. when the schemas existing in your database or the database objects below the schema level are not shown in the Database tool window).
This option defines which of the following alternative introspectors DataGrip is using to retrieve the info about the database objects (DB metadata):
A native introspector (may be unavailable for certain DBMSs). This introspector uses DBMS-specific tables and views as a source of metadata. In addition to “standard” info, it can retrieve DBMS-specific details and thus produce a more precise picture of your database objects.
A JDBC-based introspector (available for all the DBMSs). This introspector uses the metadata provided by the corresponding JDBC driver. It can retrieve only standard info about the database objects and their properties.
The JDBC-based intorspector should be used only when the native introspector fails (if this is the case, select the checkbox) or is not available (in such a case the checkbox is missing).
(The native introspector may fail, for example, when your DB server version is older than the minimum version supported by DataGrip, when you are using Amason Redshift because it “pretends” that it’s a Postgres while in fact it isn’t, etc.)

官方解释

传送门: https://www.jetbrains.com/help/datagrip/data-sources-and-drivers-dialog.html#advancedTab

猜你喜欢

转载自blog.csdn.net/qq_34033853/article/details/88858182