Prev: Help with sort on Recursive CTE
Next: ammerländer versicherung hausrat, alte leipziger hausratversicherung, alte ddr hausratversicherung, unterversicherungsverzicht, hausratversicherung kündigen umzug,
From: SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. on 15 Feb 2010 01:53 Hi Kevin, *********************** * SQL SERVER NAME * * SERVER2003 * * Local IP. 192.168.1.100 * * Internet IP. 59.59.159.59 * * * ****|**********|********* ________________| |__________________ | | ************* **************** * Switch * * ROUTER * ****|********* *******|********* ______________|____________ | _ _ VIA INTERNET | | | ***************** ***************** **************** * LOCAL * * LOCAL * * REMOTE * * COMPUTER 1 * * COMPUTER 2 * * COMPUTER 1 * ***************** ***************** **************** Please understand the remote user can keep any name of his computer (e.g. SERVER2003), But I want to provide certain facility in my application only if user is running the application on server or running that application on server using remote desktop of Local Area Network. If I can know that application has connected to server using which I.P. Address (192.168.1.100 OR 59.59.159.59), so I can provide only if connection I.P. Address is same as computer I.P. Address. If the map is not clear I can attach PDF file if you required. 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 15 Feb 2010 03:30 Sanjay, How can your internal DNS work if you don't have a central record of what machine name maps to what IP address? Again I tell you that you have an unsolvable problem because your network is not properly managed. "SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD." <sanjay(a)microbrain.in> wrote in message news:u1RicvgrKHA.3908(a)TK2MSFTNGP05.phx.gbl... > Hi Kevin, > > > *********************** > * SQL > SERVER NAME * > * > SERVER2003 * > * Local > IP. 192.168.1.100 * > * > Internet IP. 59.59.159.59 * > * * > > ****|**********|********* > ________________| > |__________________ > | | > ************* **************** > * Switch * * ROUTER * > ****|********* *******|********* > ______________|____________ | _ _ VIA INTERNET > | | | > ***************** ***************** **************** > * LOCAL * * LOCAL * * > REMOTE * > * COMPUTER 1 * * COMPUTER 2 * * COMPUTER 1 * > ***************** ***************** **************** > > Please understand the remote user can keep any name of his computer (e.g. > SERVER2003), But I want to provide certain facility in > my application only if user is running the application on server or > running that application on server using remote desktop of Local Area > Network. > > If I can know that application has connected to server using which I.P. > Address (192.168.1.100 OR 59.59.159.59), so I can provide only if > connection I.P. Address is same as computer I.P. Address. > > If the map is not clear I can attach PDF file if you required. > > 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: SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. on 16 Feb 2010 05:07 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 >>>> >>>> >>> >>> >> >> > >
From: Jay on 16 Feb 2010 10:27 "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 >>>>> >>>>> >>>> >>>> >>> >>> >> >> > >
From: SANJAY SHAH-MICROBRAIN COMPUTERS PVT. LTD. on 17 Feb 2010 01:10
No, It return same address as client address. I has tested in SQL Server 2005. 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 >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > |