symmetricds SYSADMIN发送脚本错误

时间:2014-08-27 13:56:57

标签: database-replication symmetricds

将sql脚本发送到节点或节点组的命令工作正常,但问题在于解析文件本身。     在这里,您是目标节点的日志

2014-08-27 16:51:12,130 ERROR [station-001] [DataLoaderService] [station-001-pull-1]无法加载批处理000-31因为:在文件中:内联评估:``DROP表ofep.PRODUCT_RESTRICTIONS;'遇到'ofep“在第1行,第12列。

java.lang.RuntimeException:在文件中:内联评估:``DROP TABLE ofep.PRODUCT_RESTRICTIONS;''遇到“ofep”在第1行,第12列。

at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.script(DatabaseWriter.java:919)
at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:196)
at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:167)
at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:65)
at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:217)
at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:164)
at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:114)
at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener.end(DataLoaderService.java:779)
at org.jumpmind.symmetric.io.data.writer.StagingDataWriter.notifyEndBatch(StagingDataWriter.java:75)
at org.jumpmind.symmetric.io.data.writer.AbstractProtocolDataWriter.end(AbstractProtocolDataWriter.java:220)
at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124)
at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromTransport(DataLoaderService.java:407)
at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPull(DataLoaderService.java:265)
at org.jumpmind.symmetric.service.impl.PullService.execute(PullService.java:129)
at org.jumpmind.symmetric.service.impl.NodeCommunicationService$2.run(NodeCommunicationService.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

引起:在文件中:内联评估:``DROP TABLE ofep.PRODUCT_RESTRICTIONS;''遇到“ofep”在第1行,第12列。

at bsh.Parser.generateParseException(Parser.java:6068)
at bsh.Parser.jj_consume_token(Parser.java:5939)
at bsh.Parser.BlockStatement(Parser.java:2780)
at bsh.Parser.Line(Parser.java:147)
at bsh.Interpreter.Line(Interpreter.java:1000)
at bsh.Interpreter.eval(Interpreter.java:635)
at bsh.Interpreter.eval(Interpreter.java:739)
at bsh.Interpreter.eval(Interpreter.java:728)
at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.script(DatabaseWriter.java:916)
... 20 more

2014-08-27 16:51:12,470 ERROR [station-001] [DataLoaderService] [station-001-pull-1]解析批处理失败 java.lang.RuntimeException:在文件中:内联评估:``DROP TABLE ofep.PRODUCT_RESTRICTIONS;''遇到“ofep”在第1行,第12列。

at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.script(DatabaseWriter.java:919)
at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:196)
at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:167)
at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:65)
at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:217)
at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:164)
at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:114)
at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener.end(DataLoaderService.java:779)
at org.jumpmind.symmetric.io.data.writer.StagingDataWriter.notifyEndBatch(StagingDataWriter.java:75)
at org.jumpmind.symmetric.io.data.writer.AbstractProtocolDataWriter.end(AbstractProtocolDataWriter.java:220)
at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124)
at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromTransport(DataLoaderService.java:407)
at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPull(DataLoaderService.java:265)
at org.jumpmind.symmetric.service.impl.PullService.execute(PullService.java:129)
at org.jumpmind.symmetric.service.impl.NodeCommunicationService$2.run(NodeCommunicationService.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

引起:在文件中:内联评估:``DROP TABLE ofep.PRODUCT_RESTRICTIONS;''遇到“ofep”在第1行,第12列。

at bsh.Parser.generateParseException(Parser.java:6068)
at bsh.Parser.jj_consume_token(Parser.java:5939)
at bsh.Parser.BlockStatement(Parser.java:2780)
at bsh.Parser.Line(Parser.java:147)
at bsh.Interpreter.Line(Interpreter.java:1000)
at bsh.Interpreter.eval(Interpreter.java:635)
at bsh.Interpreter.eval(Interpreter.java:739)
at bsh.Interpreter.eval(Interpreter.java:728)
at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.script(DatabaseWriter.java:916)
... 20 more

该脚本只包含一个语句“DROP TABLE ofep.PRODUCT_RESTRICTIONS;”

Could you please help me?

谢谢, 艾曼

1 个答案:

答案 0 :(得分:0)

Symadmin有三个不同的发送子命令......

send-sql            Send SQL statement to node
send-schema         Send schema change to node
send-script         Send script to node

您使用了 send-script ,用于发送BSH个脚本。

您要使用的是 send-sql