RE: Query to show who last logged at a specific machine
From: Scott (Scott_at_discussions.microsoft.com)
Date: 08/11/04
- Next message: SMSMan: "Re: HELP DEINSTALLED PRIMARY CHILD"
- Previous message: Cathy Moya [MS]: "Re: SMS 2003 Admin Console and XP SP2?"
- In reply to: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Next in thread: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Reply: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Reply: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 09:47:01 -0700
Sure.
This following line is a SQL query that can be executed in the SQL
Enterprise Administrator tool called "Query Analyzer"
select user_name0 from system_disc where name0 = 'machine name'
The query instructs SQL to "select" the user name associated with a specific
machine name from the DB table called system_disc.
If you open the query analyzer application and select your SMS DB from the
drop down box you can copy and paste the line into the query windows and
press F5 to run it. You will need to change the text (machine name) from
between the apostrophe's to a netbios name applicable to you. Be sure to
leave the apostrophe's.
You could also run this:
select * from system_disc
...which will output all of the data in the system_disc table. From here
you can copy the output and dump it to an excel spread*** for sorting etc.
"AlisonJS" wrote:
> Thanks! Any chance you would expand a little - I am a bit new to SMS :)
> Appreciate your help here.
>
> Alison
>
> "Scott" wrote:
>
> > select [user_name0] from system_disc where name0 = 'machine name'
> >
> > Happy hunting :)
> >
> > "AlisonJS" wrote:
> >
> > > I need a query where I can enter a computer name, and it will tell me who
> > > last logged on there. We have the query where you can enter the user name and
> > > it will tell you which PC they last logged on to but not the other way round.
> > > I have tried and tried..... can anyone help!!!
> > >
> > > Alison
- Next message: SMSMan: "Re: HELP DEINSTALLED PRIMARY CHILD"
- Previous message: Cathy Moya [MS]: "Re: SMS 2003 Admin Console and XP SP2?"
- In reply to: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Next in thread: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Reply: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Reply: AlisonJS: "RE: Query to show who last logged at a specific machine"
- Messages sorted by: [ date ] [ thread ]