Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
assatron
Starting Member
1 Post |
Posted - 2006-07-13 : 11:42:36
|
| I have designed a database where the calling application access the database solely through stored procedures. One of the procedures utlizes the code below to decide what datatype a certain column is. When the procedure is run with sa it works fine, when run with the restricted user I get an error. (#col_types is not populated)Do I need to assign specific permissions to the user to read from the sys tables although it is done from within a procedure?... declare @v_doc int exec sp_xml_preparedocument @v_doc output, @i_filter if OBJECT_ID('tempdb..#filter') is not null drop table #filter select id, name, val1, val2, operation into #filter from openxml(@v_doc, '/filters/filter/cols/col', 2) with (id varchar(2) '../../id', name varchar(100), val1 varchar(100), val2 varchar(100), operation varchar(7)) -- Find data type for filter columns select c.name as column_name, ty.name as type_name into #col_types from prv_table t inner join sysobjects o on t.name = o.name inner join syscolumns c on o.id = c.id inner join systypes ty on c.xtype = ty.xtype where t.name = @i_table...Any help is appreciated. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-07-13 : 12:05:35
|
| what is the error that you are getting?Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-07-13 : 21:24:01
|
| who is the owner of the sproc? if it's dbo, there shouldn't be any problem, verify the permissions for these objects if there are explicit denieshope this helps...--------------------keeping it simple... |
 |
|
|
|
|
|
|
|