Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

"Incorrect syntax" for SQL query error in log.

SA-25624

Summary



User is seeing below exception in the log file on regular basis.

' Unable to query the database: code: 156 SQLState: S0001 Message: Incorrect syntax near the keyword 'FROM'.'


Error Messages



2016-07-06 01:02:07,824 [gaDM:Administrators]] [ STANDARD] [ ] [ PegaDM:07.10] (redictorBinningSnapshot.Action) ERROR - Migrating predictor snapshots with old-style model IDs failed. Migration will be attempted again when next snapshot requested. Error: Exception in stage: ADM Predictor Snapshots / Error on node [9f1ba90e5f3e80b22149e061e2108aa6]
com.pega.dsm.dnode.api.dataflow.StageException: Exception in stage: ADM Predictor Snapshots
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageOutputSubscriber.onError(DataFlowStage.java:400)
at com.pega.dsm.dnode.api.dataflow.DataFlowStage$StageInputSubscriber.onError(DataFlowStage.java:292)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.onError(DataObservableImpl.java:287)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.subscribe(DataObservableImpl.java:325)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl.subscribe(DataObservableImpl.java:52)
at com.pega.dsm.dnode.api.dataflow.DataFlow$2.run(DataFlow.java:340)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at com.pega.dsm.dnode.impl.prpc.PrpcThreadFactory$PrpcThread.run(PrpcThreadFactory.java:81)
Caused by: com.pega.dsm.dnode.api.DNodeException: Could not perform database dataset operation on Data-Decision-ADM-PredictorBinningSnapshot
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil$2.emit(DatabaseOperationsUtil.java:142)
at com.pega.dsm.dnode.impl.stream.DataObservableImpl$SafeDataSubscriber.subscribe(DataObservableImpl.java:320)
... 5 more
Caused by: com.pega.pegarules.pub.PRRuntimeException: Unable to query the database
at com.pega.dsm.dnode.impl.dataset.database.NativeSQLBatchReader.init(NativeSQLBatchReader.java:144)
at com.pega.dsm.dnode.impl.dataset.database.NativeSQLBatchReader.<init>(NativeSQLBatchReader.java:80)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil.readFromDatabase(DatabaseOperationsUtil.java:232)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseBrowseAllOperation$1.executeExposedLogic(DatabaseBrowseAllOperation.java:68)
at com.pega.dsm.dnode.impl.dataset.database.DatabaseOperationsUtil$2.emit(DatabaseOperationsUtil.java:139)
... 6 more
Caused by: com.pega.pegarules.pub.database.DatabaseException: Unable to query the database: code: 156 SQLState: S0001 Message: Incorrect syntax near the keyword 'FROM'.
DatabaseException caused by prior exception: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near the keyword 'FROM'.
| SQL Code: 156 | SQL State: S0001

From: (B022B432284016601508062B68C26D2CD)
SQL: SELECT FROM Data.PR_DATA_DM_ADMMART_PRED_FACT "A"


Steps to Reproduce



Not Applicable


Root Cause



A defect or configuration issue in the operating environment

Resolution



Here’s the explanation for the reported behavior: 

This exception is thrown from agent '
ADMSnapshot' & this application is not using Pega Decision management. User disabled this agent to address this problem & it was mistakenly started in this environment manually.

Published July 23, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us