Skip to main content
Question

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


juliarozema
Contributor
Forum|alt.badge.img+7

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

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+7
  • Author
  • Contributor
  • October 10, 2018
trentatsafe wrote:

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?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings