on 06-11-2014 7:42 PM
Suppose I run a sp for sybase ase. Firstly I need to connect to ase with specific loginname, then I have spid for this session. sp_who can give me the ip/hostname/programname.
then with this spid, I can myproc. Question: within myproc code, can I get the ip/hostname/programname with current spid? any function or system sp for this purpose?
Try this:
select ipaddr, hostname, program_name from master..sysprocesses where spid = @@spid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a small write up on a similar issue over at Stack Exchange.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.