Skip to main content

Hi,

I have created a FME Desktop workspace that imports data into the MS SQL database which runs successfully as a scheduled task if I am logged in the server. But it fails when I'm off the server and gives me this kind of error message. (I got a blank SQL provider error)

2020-05-07 22:00:21|  11.5|  0.0|INFORM|Microsoft SQL Server Non-Spatial Writer: Trying to connect using SQL Server 2012 Native Client...
2020-05-07 22:00:22|  12.3|  0.8|ERROR |Microsoft SQL Server Non-Spatial Writer: Failed to connect using SQL Server 2012 Native Client. Provider error ''. Connection string 'Provider=SQLNCLI11;Data Source=;Initial Catalog=cadasdb_equalizer;User ID=;Password=********'
2020-05-07 22:00:22|  12.3|  0.0|ERROR |Microsoft SQL Server Non-Spatial Writer: A suitable Microsoft SQL Server Native Client is not found. Install Microsoft SQL Server 2012 Native Client from http://www.microsoft.com/en-ca/download/details.aspx?id=29065 . Please expand 'Install Instructions' and download 'sqlncli.msi'
2020-05-07 22:00:22|  12.3|  0.0|ERROR |Failed to open writer
2020-05-07 22:00:22|  12.4|  0.0|ERROR |Destination Feature Type Routing Correlator (RoutingFactory): Failed to open writer

I use a FME Desktop version 2019.2.1 (32bit) and have the MS SQL Server Native client 2012 (Both 32 bit and 64 bit ) installed. 

I created a .bat file (LoadEqualizer2020.bat) to call the workspace :

C:\apps\FMEx86\fme.exe C:\FMEWorkspace\Wrokspace\load_equalizer_sql_all_Prod_test.fmw

It is set up in the scheduled task under my account as :

0684Q00000ArE5ZQAV.png

I also made the db connection public:

0684Q00000ArE7jQAF.png

0684Q00000ArE7oQAF.png

 

I've checked other posts but cannot find a solution. Any help is appreciated!

 

Jing

 

Are you using OS Authentication or a named user on the server?


Are you using OS Authentication or a named user on the server?

I use a domain user.


In these kind of deployment it is usually preferable to run the schdueled jobs under a service account.

You can edit the schduled jobs to run using the service account.


In these kind of deployment it is usually preferable to run the schdueled jobs under a service account.

You can edit the schduled jobs to run using the service account.

Would you explain a little more about it? I currently use a Domain admin account to run the task.


In these kind of deployment it is usually preferable to run the schdueled jobs under a service account.

You can edit the schduled jobs to run using the service account.

I've tried using domain admin account, local admin, Local Service, Network Service, System accounts, but still got the same error. I also have SQL Server Native Client 2012 32 bit and 64 bit installed. As a test, I am able to connect to the database with both clients through ODBC.


In the scheduled task under "Security Options" make sure you have "Run whether user is logged in or not" and "Run with highest privileges" set.


I use a domain user.

I don't think it's a SQL server issue. If you look at your connection string you are missing a Data Source and User ID.

 

'Provider=SQLNCLI11;Data Source=;Initial Catalog=cadasdb_equalizer;User ID=;Password=********'

 

If you have access to the server, create a server user in SQL Server using SSMS or whatever management tool you use, grant permission for the user to the database, and reconfigure your FME connection using that account.

 


In the scheduled task under "Security Options" make sure you have "Run whether user is logged in or not" and "Run with highest privileges" set.

Yes it is already configured with that two settings.


I found this solution helps!

https://knowledge.safe.com/answers/97663/view.html

Instead of using a database connection, I used Embed Connection Parameters...

and the problem is solved!!


Reply