Skip to main content
Question

Fatal error when writing a shapefile to an sqlserver database

  • February 15, 2021
  • 6 replies
  • 15 views

masonb12
Contributor
Forum|alt.badge.img+12

Hi, I am getting a fatal error when I use a shapefile reader and an sqlserver writer. I am simply trying to create a new table in an existing sqlserver database. The projection is LL84 in the shapefile. I can select the database in the writer, so I know there is a connection. Any advice welcome. thanks, Here is some of the log file: TABLE SDF_2_Schema.[SHIM_STREAMS_line] ([Name] varchar(254), [Url] varchar(254), [Key] varchar(254), [Autogenera] integer, [GEOM] geometry)'. Provider error `(2760) The specified schema name "SDF_2_Schema" either does not exist or you do not have permission to use it.'

2021-02-14 14:15:26|  1.1| 0.0|ERROR |Microsoft SQL Server Spatial Writer: Failed to create the destination table for feature type `SDF_2_Schema.SHIM_STREAMS_line'

2021-02-14 14:15:26|  1.1| 0.0|ERROR |MSSQL_SPATIAL writer: A fatal error has occurred. Check the logfile above for details

2021-02-14 14:15:26|  1.1| 0.0|ERROR |auto __cdecl DynaWriteChannel::putFeature::<lambda_de445ec4033891b5977d661108460104>::operator ()(void) const(C:\\code\\fme\\foundation\\pluginbuilder\\pluginbuilder_cpp\\dynawch.cpp:125) - auto __cdecl DynaWriteChannel::putFeature::<lambda_de445ec4033891b5977d661108460104>::operator ()(void) const(C:\\code\\fme\\foundation\\pluginbuilder\\pluginbuilder_cpp\\dynawch.cpp:125)

6 replies

hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Celebrity
  • February 15, 2021

Do the credentials you're using to connect to SQL have the appropriate rights to write/create/use the schema on that database?

 

If you connect to the database using SQL Manager can you create a table in that database using the same credentials?


masonb12
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • February 15, 2021

Yes I just tested adding a new table via ssms and it works. I have full admin rights


masonb12
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • February 15, 2021
hkingsbury wrote:

Do the credentials you're using to connect to SQL have the appropriate rights to write/create/use the schema on that database?

 

If you connect to the database using SQL Manager can you create a table in that database using the same credentials?

Hi there, I am writing to an existing database and want to create a new table so there is no schema there to worry about.. There are a few other tables in it though. I can manually create and save a new table using ssms as I have full admin rights.

steveatsafe
Safer
Forum|alt.badge.img+12
  • Safer
  • February 16, 2021

Hi @masonb12​ ,

We heard you were able to get past this by using a different tablename.

In my tests I had no issues creating this table with the same name.

Were there any other messages in the log file that might indicate troubles?

 


masonb12
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • February 16, 2021
steveatsafe wrote:

Hi @masonb12​ ,

We heard you were able to get past this by using a different tablename.

In my tests I had no issues creating this table with the same name.

Were there any other messages in the log file that might indicate troubles?

 

It was the name of the shapefile itself that was causing the problem. I just changed the name of the shapefile and now it works fine. But I am having another issue trying to read microsoft access and write to sqlserver. It looks like we are missing a driver because microsoft access is not installed.

masonb12
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • February 16, 2021
steveatsafe wrote:

Hi @masonb12​ ,

We heard you were able to get past this by using a different tablename.

In my tests I had no issues creating this table with the same name.

Were there any other messages in the log file that might indicate troubles?

 

Here is the new error I am getting when working with microsoft access database and sql server: ADO Provider not installed or not compatible with FME architecture. Try installing Microsoft Access 2013 Runtime (x64); follow this link for more information: http://www.microsoft.com/en-us/download/details.aspx?id=39358 Plugin 'MDB_ADO' was loaded, but a reader could not be created. Error was #1: A fatal error has occurred. Check the logfile above for details Failed to open the dataset 'C:\\Users\\bmason\\Documents\\TESTSHIMWATERCOURSES\\SHIM2004.mdb' DATASET INFO: DATASET: C:\\Users\\bmason\\Documents\\TESTSHIMWATERCOURSES\\SHIM2004.mdb NUMBER OF PARAMETERS: 0

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