[dba-SQLServer] Finding current login group

David Emerson davide at dalyn.co.nz
Thu Jul 8 18:45:46 CDT 2004


Thanks Billy and Francis (any anyone else who helped).  I finally got it 
working using Billy's code below.

David

At 7/07/2004, you wrote:
>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>
>_______________________________________________
>dba-SQLServer mailing list
>dba-SQLServer at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list