[Fdo-trac] [fdo-trac] #933: SQL Server Requires Connect to all Databases on Server
FDO
trac_fdo at osgeo.org
Tue Nov 21 00:47:49 PST 2017
#933: SQL Server Requires Connect to all Databases on Server
-------------------------------+-------------------------
Reporter: gluckett | Owner: danstoica
Type: defect | Status: new
Priority: major | Milestone: 4.1.0
Component: SQLServer Spatial | Version: 4.0.0
Severity: 2 | Resolution:
Keywords: connect, user | External ID:
-------------------------------+-------------------------
Comment (by jng):
The database listing query is currently something like this (according on
SQL Server Profiler):
{{{
select name
from master.dbo.sysdatabases S
where databasepropertyex(name, 'Status')='ONLINE'
order by name collate latin1_general_bin asc
}}}
Based on (https://stackoverflow.com/questions/9506927/how-to-find-
databases-which-accessible-to-me-in-sql-server), if we want to cut this
off to only databases the specified login can access, then the query
should actually be:
{{{
select name, HAS_DBACCESS(name)
from master.dbo.sysdatabases S
where databasepropertyex(name, 'Status')='ONLINE'
order by name collate latin1_general_bin asc
}}}
And the FDO provider should only consider rows where
{{{HAS_DBACCESS(name)}}} evaluated to {{{1}}}
--
Ticket URL: <https://trac.osgeo.org/fdo/ticket/933#comment:2>
FDO <http://fdo.osgeo.org/>
Feature Data Objects
More information about the fdo-trac
mailing list