SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to set xp_logininfo permissions


How to set xp_logininfo permissions

Author
Message
pdanes2
pdanes2
SSC-Enthusiastic
SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)SSC-Enthusiastic (176 reputation)

Group: General Forum Members
Points: 176 Visits: 462
I have a routine in my front-end that calls the following stored procedure and examines the resulting recordset to see to which groups the current user belongs. A few controls in the app are then enabled or not, depending on group membership.

Ths procedure used to work just fine, until our IT department decided to move the entire museum into a domain (previously it was just workgroups). They're pretty understanding about it all and willing to work with me, so I asked them to move just the server into the domain first. They did, and I still have admin privileges on it, but this routine quit working when they did that.

If I log in as sa and execute the procedure as is, it works fine, but the app can't run it - get an error message that execute permission was denied on xp_logininfo.

If I uncomment the line 'WITH EXECUTE AS OWNER', I don't get an error, but I also don't get any results. Both as sa, running directly on the server via remote desktop, and from the app, executing it as an ODBC-accessible stored procedure, I get back an empty recordset.

What happens when going to a domain and what do I need to do to make this work?

Pete


CREATE PROCEDURE [dbo].[spClenSkupiny]
@Skupina as varchar(100)
--WITH EXECUTE AS OWNER
AS
BEGIN
SET NOCOUNT ON;
declare @Server_Skupina varchar(100)
set @Server_Skupina = 'PALEO-SERVER\' + @Skupina
EXEC master.dbo.xp_logininfo @Server_Skupina, 'members'
END


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search