Skip to main content
Question

Microsoft SQL Server Spatial (JDBC) Reader fails to read views


vki
Contributor
Forum|alt.badge.img+7
  • Contributor

I want to read some views in Microsoft SQL Server Database using a Database-Alias (not the Servername).

I tried to make a DB-Connection using Microsoft SQL Server (ADO), but it didn't work with the alias (it works with the Servername).
With a Microsoft SQL Server (JDBC)-DB-Connection, I can access the DB, using the DB-alias.
 
Then I wanted to read the views, using the Microsoft SQL Server Spatial (JDBC)-Reader:
I can access the database, but not the views. (In a database-application like DBeaver it works fine) 

TheDB- user account I use, is allowed to read the view, but not the underlying tables. 

Is FME not able to handle those permissions? 

 

3 replies

s.jager
Influencer
Forum|alt.badge.img+16
  • Influencer
  • January 9, 2025

FME is able to use SQL Server DB Aliases (we are using them ourselves), so not sure why that won’t work in your setup. I am not familiar enough with DB aliases to be able to say anything about that, except that it should work with a simple Microsoft SQL Server (ADO)  DB Connection.

 

As far as views and underlying tables go, if the views and the tables have different owners, then the users need permissions on the tables. If the views and the tables have the same owner, permission chaining allows for skipping the permissions on the tables. See here.


vki
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • January 13, 2025

Thanks, I’ll stick to the servername as it doesn’t work with the alias...


s.jager
Influencer
Forum|alt.badge.img+16
  • Influencer
  • January 13, 2025
vki wrote:

 it doesn’t work with the alias...

What exactly “doesn’t work”? Are you getting error messages? Just timeouts? Have you asked your IT department to check if applications are blocked from connecting to the database? Is there any logging done on the database? How is the network connection and any firewalls between FME and the database set up?

I find it a bit strange that you say that the JDBC-connection is apparently able to use the alias, but the ADO-connection isn’t. That also makes me wonder how you’ve set up your alias.

We might be able to help you solve this, but we’ll need a bit more information, since there could be a million things going wrong here.


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