简体   繁体   English

JetBrains DataGrip 尝试连接到 Firebird 时出现“命令行意外结束 - 第 1 行,第 8 列”

[英]"Unexpected end of command - line 1, column 8" in JetBrains DataGrip trying to connect to Firebird

I'm trying to connect to a Firebird database hosted in a Docker from the DataGrip client, but this error appears:我正在尝试从 DataGrip 客户端连接到 Docker 中托管的 Firebird 数据库,但出现此错误:

WARNING: No connection character set specified (property lc_ctype, encoding, charSet or localEncoding警告:未指定连接字符集(属性 lc_ctype、编码、charSet 或 localEncoding
[42000][335544851] Dynamic SQL Error; [42000][335544851] 动态 SQL 错误; SQL error code = -104; SQL 错误代码 = -104; Unexpected end of command - line 1, column 8 [SQLState:42000, ISC error code:335544851]命令行意外结束 - 第 1 行,第 8 列 [SQLState:42000,ISC 错误代码:335544851]

警告:未指定连接字符集(属性 lc_ctype、编码、charSet 或 localEncoding),默认为字符集 NONE

I've tried to give a path in the file encoding, but I don't have any idea to how Jaybird works.我试图在文件编码中提供路径,但我对 Jaybird 的工作原理一无所知。

在此处输入图像描述

What do I need to do?我需要做什么?

The problem is caused by IntelliJ (DataGrip is based on IntelliJ) executing a "keep-alive query" when testing the connection, but the default configuration for the Firebird driver doesn't have a keep-alive query.问题是由于 IntelliJ(DataGrip 基于 IntelliJ)在测试连接时执行了“keep-alive query”,但 Firebird 驱动程序的默认配置没有 keep-alive 查询。 When no keep-alive query is configured, IntelliJ seems to execute the query select 1 (though I haven't verified this, the fact the error mentions "column 8" seems to hint at that).当没有配置 keep-alive 查询时,IntelliJ 似乎执行查询select 1 (虽然我没有验证这一点,但错误提到“第 8 列”的事实似乎暗示了这一点)。 This causes Firebird to return an error, because Firebird requires a from-clause.这会导致 Firebird 返回一个错误,因为 Firebird 需要一个 from 子句。

To solve this, go to the "Drivers" tab of the "Data Sources and Drivers" screen, select "Firebird" (under "Basic Support"), and on the options tab, enter the "Keep-alive query" select 1 from rdb$database .要解决此问题,go 到“数据源和驱动程序”屏幕的“驱动程序”选项卡,select“Firebird”(在“基本支持”下),然后在选项选项卡上,输入“保持活动查询” select 1 from rdb$database

As an aside, you can make the warning about the connection character set go away by explicitly configuring a connection character set (property charSet ) on the "Advanced" tab of the connection configuration.另外,您可以通过在连接配置的“高级”选项卡上显式配置连接字符集(属性charSet )来消除有关连接字符集 go 的警告。

I reported this to JetBrains: Configuration for Firebird misses default keep-alive query causing error on connection test我向 JetBrains 报告了这个: Firebird 的配置错过了默认的保持活动查询,导致连接测试出错

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 JetBrains DataGrip 中显示列和表注释? - How to show column and table comment in JetBrains DataGrip? 如何在JetBrains DataGrip中连接到MS SQL Server Express? - How to connect to MS SQL Server Express in JetBrains DataGrip? 命令行工具,用于修改JetBrains项目中.idea文件夹中的XML - Command line tool to modify XML in .idea folder in JetBrains projects 如何从命令行在 PHPStorm 或 IntelliJ(或任何 JetBrains IDE)中打开目录? - How to open a directory in PHPStorm or IntelliJ (or any JetBrains IDE) from the command line? JetBrains IDE-是否可以为现有命令创建别名? - JetBrains IDE - Is it possible to create an alias for existing command? 无法从 Intellij Idea Ultimate/DataGrip 连接到 mongo atlas - Not able to connect to mongo atlas from Intellij Idea ultimate/ DataGrip 尝试从 Java 中的命令行解析 JSON 时出错 - Error trying to parse JSON from Command Line in Java java.lang.AssertionError:意外的节点Pythonid; nodes = [org.jetbrains.plugins.terminal,org.jetbrains.plugins.javaFX - java.lang.AssertionError: Unexpected node Pythonid; nodes=[org.jetbrains.plugins.terminal, org.jetbrains.plugins.javaFX JetBrains:根据每行的第一个字母按字母顺序对文件进行排序 - JetBrains: Sort a file alphabetically based on first letter of each line 如何在Jetbrains Rider 2018.1中强制执行LF行结尾 - How do I enforce LF line endings in Jetbrains Rider 2018.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM