tomcat server.xml sybase 属性

发布于 2024-12-12 11:07:58 字数 295 浏览 6 评论 0原文

在 Tomcat 的 server.xml 中,我有一个 标记,其中 Sybase 数据源正常工作。我需要将下面的 Sybase 特定属性添加到 中:

GET_BY_NAME_USES_COLUMN_LABEL = true

但我不确定将其放在哪里。我该怎么做呢?

In the server.xml for Tomcat I have a <Resource> tag with a Sybase datasource working correctly. I need to add the Sybase specific property below to the <Resource>:

GET_BY_NAME_USES_COLUMN_LABEL = true

But I am not sure where to put it. How can I do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

娇妻 2024-12-19 11:07:58

我不使用 Sybase,所以我无法从头顶上分辨出来,但在所有其他数据库上,这些类型的连接属性通常以 JDBC 连接 URL 的查询字符串格式传递。 Sybase JDBC 文档 证实这对于 Sybase 来说也是如此。以下是相关性的摘录:

要在 URL 中设置连接属性,请将属性名称及其值附加到 URL 定义中。使用此语法:

jdbc:sybase:Tds:主机:端口/数据库?property_name=值

要设置多个连接属性,请附加每个附加连接属性和值,前面加上“&”。例如:

jdbc:sybase:Tds:myserver:1234/mydatabase?LITERAL_PARAMS=t​​rue&PACKETSIZE=512&HOSTNAME=myhost

所以,这应该适合你:

jdbc:sybase:Tds:localhost:1234?GET_BY_NAME_USES_COLUMN_LABEL=true

I don't do Sybase, so I can't tell it from top of head, but on all other databases those kind of connection properties are usually to be passed in a query string format of the JDBC connection URL. The Sybase JDBC documentation confirms that this is true for Sybase as well. Here's an extract of relevance:

To set a connection property in the URL, append the property name and its value to the URL definition. Use this syntax:

jdbc:sybase:Tds:host:port/database?property_name=value

To set multiple connection properties, append each additional connection property and value, preceded by "&." For example:

jdbc:sybase:Tds:myserver:1234/mydatabase?LITERAL_PARAMS=true&PACKETSIZE=512&HOSTNAME=myhost

So, this should do it for you:

jdbc:sybase:Tds:localhost:1234?GET_BY_NAME_USES_COLUMN_LABEL=true
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文