July 9, 2008 at 8:15 am
Hi,
i need to find if exists this username and hostname in the sys.sysprocesses but i need to find if it exists in any row not in the columns.
for example - i need to find if in the sys.sysprocesses rows there is a loginame = mike and hostname = computer,not in columns loginame or hostname.
THX
July 9, 2008 at 8:31 am
What columns would those be in other than the ones you don't want?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
July 9, 2008 at 8:48 am
i don't understand what you are saying.
July 9, 2008 at 9:13 am
Certain data is in sysprocesses, and the user "mike" could only be in certain columns, not any column.
So your question doesn't make sense.
July 9, 2008 at 11:07 am
select
*
from master..sysprocesses
Where loginame like 'MIKE%'
and HOSTNAME like 'your hostname'
only the columns that you can dig down for a Login are:
NT_USERNAME,LOGINAME AND HOSTNAME for yourHostName
Maninder
www.dbanation.com
July 9, 2008 at 12:34 pm
i think that i can manager with the code.
but how can i catch the hostname when a user is login to the SQL with the DDL Trigger logon event?
if i use the ClientHost option i get the ip address of that machine,i need the netbios name of that machine because i compare it with the hostname column in the sys.sysprocesses
THX
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply