SQL server - won't enumerate unless user has access to all databases

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL server - won't enumerate unless user has access to all databases

GordonL
This post has NOT been accepted by the mailing list yet.
FDO 3.8
User must be able to read all databases on SQL server to connect..my user only can connect to 2 of8, so MapGuide fails on database browse...

Workaround?
Reply | Threaded
Open this post in threaded view
|

Re: SQL server - won't enumerate unless user has access to all databases

Jackie Ng
Is this not intended behaviour? If the user is not configured for access to the other 6 databases, I wouldn't expect those databases to show up if I try to connect using that user's credentials.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: SQL server - won't enumerate unless user has access to all databases

GordonL
This post has NOT been accepted by the mailing list yet.
Yes but errors out and get no databases after failure.
User is set up so that it cannot even connect to databases, but full admin on a couple...
Code must be getting database list from master table even though user can't see database

I think that is why Mg is failing.


Mgos 2.5 and 3.8 fdo and latest rc build maestro.
Reply | Threaded
Open this post in threaded view
|

Re: SQL server - won't enumerate unless user has access to all databases

Hans Milling
In reply to this post by Jackie Ng
I think the problem is with older releases also.

I am running MGOS 2.2.5703 and Maestro 4.0.5.7527 and I just tested gettting a list of databases (with a user who has only access to a single database) i get the following error (and no way to select any data store):
Failed to enumerate data stores. Reason: The remote server returned an error: (559) MgFdoException._:
An exception occurred in FDO component.
RDBMS: [Microsoft][ODBC SQL Server Driver][SQL Server]The server principal "xxx" is not able to access the database "yyy" under the current security context.

Hans...
Reply | Threaded
Open this post in threaded view
|

Re: SQL server - won't enumerate unless user has access to all databases

GordonL
Oh Dear, 2016 and this bug still exists.  

Back in 2013 Bruno had a custom FDO build to fix the issue, but the bug is still around (FDO 4)  and his builds are not on his site any more
http://osgeo-org.1560.x6.nabble.com/Fwd-OSGeo-Discuss-Why-does-OSGeo-FDO-Provider-for-SQL-Server-Spatial-try-to-access-the-wrong-databas-tp5078593p5080148.html


The user should not have to have access to all databases in the SQL Server just to connect to one.

Reply | Threaded
Open this post in threaded view
|

Re: SQL server - won't enumerate unless user has access to all databases

Hans Milling
I ran into this just the other day. The solution is to copy an existing SQL Spatial Feature Source, and edit the xml to point to a different server/database.
Reply | Threaded
Open this post in threaded view
|

Re: SQL server - won't enumerate unless user has access to all databases

GordonL
Yes, tried that trick before, and it works great with Maestro.

The challenge is when I try to do a schema override with FDO Toolbox, I can't copy the XML in that tool.