From: SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. on
Yes Jay You are right.

In case SQL Server 2005 installed on local machine (i.e. other then any
server) then it returns <Local Machine> in Client_Net_Address and NULL in
Local_Net_Address.

Thanks, Once again.

Sanjay shah

"Jay" <spam(a)nospam.org> wrote in message
news:%23wPMIyxrKHA.728(a)TK2MSFTNGP04.phx.gbl...
> "client_net_address" returns a value of "local_machine" when running on
> the local server and "local_net_address" returns NULL.
>
> "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <sanjay(a)microbrain.in> wrote
> in message news:uECPcAvrKHA.1352(a)TK2MSFTNGP06.phx.gbl...
>> Hi Kevin,
>>
>> I got it. My main requirement is that current application is running on
>> server or not.
>>
>> So we can use T-SQL as follows
>>
>> SELECT Client_Net_Address, Local_Net_Address FROM SYS.DM_Exec_Connections
>> WHERE Session_ID = @@SPID;
>>
>> If Both address is same means application is running on server.
>>
>> Thanks,
>>
>> Sanjay Shah
>>
>> "TheSQLGuru" <kgboles(a)earthlink.net> wrote in message
>> news:2aSdneXl9YgjierWnZ2dnUVZ_hednZ2d(a)earthlink.com...
>>> Sorry, but you completely lost me with that logic. Can you provide a
>>> textual map please?
>>>
>>> --
>>> Kevin G. Boles
>>> Indicium Resources, Inc.
>>> SQL Server MVP
>>> kgboles a earthlink dt net
>>>
>>>
>>> "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <sanjay(a)microbrain.in>
>>> wrote in message news:enjEnmLrKHA.4284(a)TK2MSFTNGP04.phx.gbl...
>>>> Hi Kevin,
>>>>
>>>> This will return ServerName on which Instance Running. But if server is
>>>> not same network and user keep same machine name of his computer then
>>>> this will not work.
>>>>
>>>> Sanjay Shah
>>>>
>>>> "TheSQLGuru" <kgboles(a)earthlink.net> wrote in message
>>>> news:7-mdnRNUlaZDPuvWnZ2dnUVZ_vKdnZ2d(a)earthlink.com...
>>>>> select @@servername
>>>>>
>>>>> --
>>>>> Kevin G. Boles
>>>>> Indicium Resources, Inc.
>>>>> SQL Server MVP
>>>>> kgboles a earthlink dt net
>>>>>
>>>>>
>>>>> "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <sanjay(a)microbrain.in>
>>>>> wrote in message news:%23n82YTKrKHA.3800(a)TK2MSFTNGP06.phx.gbl...
>>>>>> Dear Sir,
>>>>>>
>>>>>> Please help me for How to know that SQL Server Instance to which
>>>>>> application is running on same computer on which application is
>>>>>> running. (i.e. Application & SQL Server is running on same computer).
>>>>>>
>>>>>> Because in my application, I want to provide few feature only at
>>>>>> server level.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Sanjay Shah
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>