sql server - How to call an extended procedure from a function -
hi im having trouble trying following function work.
create function test ( @nt_group varchar(128) ) returns @nt_usr table ( [name] [nchar](128) null , [type] [char](8) null , [privilege] [char](9) null , [mapped login name] [nchar](128) null , [permission path] [nchar](128) null ) begin insert @nt_usr exec master.dbo.xp_logininfo 'domain\user', @nt_group return end
as far know should allowed call extended stored procedure, im getting following error
mes 443, level 16, state 14
could xp_logininfo might return different result sets depending on parameters? when use openquery can overcome setting this: set fmtonly off. know if there's similar workaround problem?
you can't because xp returns data. though loading table.
basically, xps in udfs non-starter... i'd use stored procedure
from create function
calling extended stored procedures functions
the extended stored procedure, when called inside function, cannot return result sets client. ods apis return result sets client return fail. extended stored procedure connect instance of sql server; however, should not try join same transaction function invoked extended stored procedure.
similar invocations batch or stored procedure, extended stored procedure executed in context of windows security account under sql server running. owner of stored procedure should consider when giving execute permission on users.
Comments
Post a Comment