Everything worked great.
That was until I added a field and asked a user (with very elevated privileges) to refresh the linked tables. They did, but the audit fields referencing the user-defined types disappeared.
At first, I thought it was some silliness in their file-based DSN, but even using my connection (with Windows-based security... so it pointed to their account) the audit fields remained hidden.
To make the whole story more perverse, if I used the same connection logged in as me (I am a dbo) the tables refreshed with the audit fields and they could also see them.
After much googling I finally stumbled upon this post and this msdn article which indicate that user-defined types have permissions including: CREATE, GRANT, DENY, ALTER, CONTROL, TAKE OWNERSHIP, REFERENCES, EXECUTE, VIEW DEFINITION and REVOKE.
To set permissions to allow anyone to view a user-defined datatype, use the following
grant execute on TYPE::[dbo].[user_data_type] to public;
Or the appropriate user or role.
References:
- "Microsoft SQL User Defined Types". My Real Life Work, Charles Solar. 2009-08-21.
- "User-Defined Table Types", SQL Server Books Online (MSDN). Sep. 30, 2009.

0 comments:
Post a Comment