Skip to main content
Question

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

  • October 9, 2018
  • 3 replies
  • 91 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+6
  • Safer
  • October 9, 2018

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
  • October 10, 2018

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+5
  • Contributor
  • November 30, 2023

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