Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server查询的时候提示包含的前缀超出了最大限值。最多只能有 3 个 #99

Open
wants to merge 175 commits into
base: master
Choose a base branch
from

Conversation

D-T-Y
Copy link

@D-T-Y D-T-Y commented Jan 28, 2019

由于正式库,因此数据库名称无法修改,这种情况下需要如何调整呢?

以下是错误信息:
2019-01-28 12:06:34.586 [main] ERROR com.taobao.yugong.controller.YuGongInstance - table[Honey.Mob.UAT.R.Inventory_Info] start failed caused by org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [select min(CONVERT(BIGINT, %%physloc%%)) from Honey.Mob.UAT.R.dbo.[Inventory_Info]]; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: 对象 名称 'Honey.Mob.UAT.R.dbo.Inventory_Info' 包含的前缀超出了最大限值。最多只能有 3 个。
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:97)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:619)
at com.taobao.yugong.extractor.FullContinueExtractor.getMinId(FullContinueExtractor.java:70)
at com.taobao.yugong.extractor.FullContinueExtractor.(FullContinueExtractor.java:59)
at com.taobao.yugong.extractor.AbstractFullRecordExtractor.initContinueExtractor(AbstractFullRecordExtractor.java:70)
at com.taobao.yugong.extractor.AbstractFullRecordExtractor.start(AbstractFullRecordExtractor.java:77)
at com.taobao.yugong.controller.YuGongInstance.start(YuGongInstance.java:176)
at com.taobao.yugong.controller.YuGongController.start(YuGongController.java:267)
at com.taobao.yugong.YugongApp.run(YugongApp.java:67)
at com.taobao.yugong.YugongApp.main(YugongApp.java:55)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 对象 名称 'Honey.Mob.UAT.R.dbo.Inventory_Info' 包含的前缀超出了最大限值。最多只能有 3 个。
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:232)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1672)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:460)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:405)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7535)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2438)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:208)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:183)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:317)
at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228)
at com.taobao.yugong.extractor.FullContinueExtractor.lambda$getMinId$0(FullContinueExtractor.java:72)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
... 9 more

dijingchao added 30 commits May 3, 2017 17:06
…xtractor' into feature/sql-server-support #ARCH-1337
@CLAassistant
Copy link

CLAassistant commented Jan 28, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alswl
❌ shilin


shilin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alswl
❌ shilin


shilin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants