From: SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. on
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


From: TheSQLGuru on
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
>
>


From: SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. on
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
>>
>>
>
>


From: TheSQLGuru on
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
>>>
>>>
>>
>>
>
>


From: Jay on
Sanjay,

Are you telling us that you have two, or more, machines with both the same
name and the same instance name (or default) in your organization?

If so, then your problem isn't a database problem, it's an organizational
and/or network topography issue.

@@SERVERNAME is what was intended by Microsoft to address your issue. If
someone has done something stupid in your environment that prevents it being
effective, we just can't help.

"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
>>>
>>>
>>
>>
>
>