Skip to main content
Question

SQLExecutor - Incorrect Syntax - Trying to Disable Trigger on SQL DB

  • Oct 9, 2018 9:10 PM UTC
  • 3 replies
  • 151 views

juliarozema
Contributor
Forum|alt.badge.img+10

Hello,

I have a SQLExecutor connecting to my SDE on a SQL database. I am using the Microsoft SQL Server Non-Spatial Format with an embedded Connection.

My SQL Statement is:

FME_SQL_DELIMITER ;

 

GO

 

DISABLE TRIGGER gisowner.SEGME_MSLINK_COUNTER ON gisowner.[a10];

 

GO

I get the following errors:

Query failed, possibly due to a malformed statement.

Provider error `(-2147217900) Incorrect syntax near the keyword 'TRIGGER'.'

A fatal error has occurred. Check the logfile above for details

Failed to read features from dataset 'AHS_GIS' using the 'MSSQL_ADO' reader

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

trentatsafe
Safer
Forum|alt.badge.img+7

Hello @juliarozema

The cause of the error is the GO statement. The GO is not a true T-SQL statement, but is used with SQLcmd or OSQL utilities(such as SQL Server Management Studio). More information can be found here: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-2017

 

 

As such if you alter your statement to the following:

 

 

FME_SQL_DELIMITER ; DISABLE TRIGGER gisowner.SEGME_MSLINK_COUNTER ON gisowner.a10;

 I tried the above with my own syntax and it worked correctly. I hope that helps!


juliarozema
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • Oct 10, 2018 3:29 PM UTC

Hello @juliarozema

The cause of the error is the GO statement. The GO is not a true T-SQL statement, but is used with SQLcmd or OSQL utilities(such as SQL Server Management Studio). More information can be found here: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-2017

 

 

As such if you alter your statement to the following:

 

 

FME_SQL_DELIMITER ; DISABLE TRIGGER gisowner.SEGME_MSLINK_COUNTER ON gisowner.a10;

 I tried the above with my own syntax and it worked correctly. I hope that helps!

Thank you so much!!

 

 


ponting13
Contributor
Forum|alt.badge.img+6
  • Contributor
  • Nov 30, 2023 3:02 AM UTC

Were you able to replace "GO" with something else to make this statement run?