[dba-SQLServer] Finding current login group

Francis Harvey HARVEYF1 at WESTAT.com
Wed Jul 7 14:13:22 CDT 2004


David,

Sorry, I hope you weren't waiting for a better approach from me.
Billy's example is exactly what I had in mind for you to use
with xp_logininfo.

Francis R Harvey III
WB 303, (301)294-3952
harveyf1 at westat.com


> -----Original Message-----
> From: dba-sqlserver-bounces at databaseadvisors.com 
> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf 
> Of Billy Pang
> Sent: Tuesday, July 06, 2004 9:32 PM
> To: dba-sqlserver at databaseadvisors.com
> Subject: RE: [dba-SQLServer] Finding current login group
> 
> 
> perhaps sql server thinks that xp_logininfo is a table in the select 
> statement quoted in your email.
> 
> if you want to store results from sproc, create a temp table 
> and then put 
> sproc after the insert statement..
> 
> using the sp_who as an example...
> 
> /* cut here */
> CREATE TABLE #TT
> (
> spid varchar(100),
> ecid varchar(100),status varchar(100), loginame varchar(100),
> hostname varchar(100), blk varchar(100),dbname varchar(100),
> cmd varchar(100)
> )
> go
> insert into #TT
> EXEC sp_who
> go
> select spid from #tt
> go
> DROP TABLE #TT
> go
> 
> /* cut here */
> 
> 
> >From: David Emerson <davide at dalyn.co.nz>
> >Reply-To: dba-sqlserver at databaseadvisors.com
> >To: dba-sqlserver at databaseadvisors.com
> >Subject: RE: [dba-SQLServer] Finding current login group
> >Date: Wed, 07 Jul 2004 09:58:49 +1200
> >
> >Francis,
> >
> >That is my intention but how do I get the recordset from the 
> sproc.  The 
> >following doesn't work -
> >
> >SELECT Permission_Path FROM master..xp_logininfo
> >
> >Error message is "Invalid object name 'master..xp_logininfo'."
> >
> >David
<snip>



More information about the dba-SQLServer mailing list