MSSQL 2005 sp3 32 bit running on Windows 2003
I have a sql server user MyUser in a database called MyDatabase. MyUser is able to access the MyDatabase database via SSMS. He is also dbo for that database.
When using the EMS Database Comparer 2011 to compare this database, I am getting the following error.
The SELECT permission was denied on the object 'syscolumns', database 'mssqlsystemresource', schema 'sys'
MyUser is not in the db_denydatareader or db_denydatawriter database roles
Is this normal, if so, what can be done to resolve it.
I am able to run the comparison as sysadmin.
I ran a trace using profiler and replayed using the MyUser user
Here is the result
The Query that causes the error
SELECT
p.action
, p.protecttype
, p.columns
, p.grantor
, MAX(c.colid) AS colnum
, u.name
FROM
sysprotects p
INNER JOIN
sysusers u
ON u.uid = p.uid
LEFT OUTER JOIN
syscolumns c
ON c.id = p.id
WHERE
p.id = 1497772393
GROUP BY
p.id
, p.action
, p.protecttype
, p.columns
, p.grantor
, u.name
The error sent back by profiler
[Microsoft][SQL Native Client][SQL Server]The SELECT permission was denied on the object 'syscolumns', database 'mssqlsystemresource', schema 'sys'. (State 42000) (Code 229)
Some additional Clues
- Permissions error if the query is run from SSMS on the same machine as EMS
- No error when if the query is run from SSMS on the MSSQL server itself.