SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Old Forums
 CLOSED - General SQL Server
 Unique workstation/client ID in web application ?
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

gispro
Starting Member

Denmark
21 Posts

Posted - 01/25/2006 :  08:41:38  Show Profile  Visit gispro's Homepage
Whenever I'm working with MS/SQL in a desktop environment, I can use the HOST_NAME() function to let the server know which workstation is accessing the database.

However, when I try to use it in a web application - as in Reporting Server - the HOST_NAME() yields the server name, not the workstation name - which makes sense but doesn't help me. This is even true when the web application runs under Integrated Security, as RP does.

I've tried to look into almost all the system variables available, but they typically yield "dbo", "sa" or even ".Net SqlClient Data Provider". Nothing unique at least.

Is there any way to have the SQL Server know which workstation is accessing it thru a web application ?

I need it to coordinate multi-user access to a common report/solution (in RP). Other suggestions to that end are highly appriciated as well.

--
GisPro

gispro
Starting Member

Denmark
21 Posts

Posted - 01/25/2006 :  10:06:17  Show Profile  Visit gispro's Homepage
Further to my post above, I've continued experimenting with various functions and variables.

It seems that the SERVERPROPERTY() function with both parameters "servername" and "machinename" will return my workstation name !?

It seems to be somewhat unreasonable, it being a "server" related function, but I'm definitely happy as long as it work. Howeever, if anyone can offer a good explanation for this strange behaviour, I'll be happy to hear it :-)


--
GisPro
Go to Top of Page

gispro
Starting Member

Denmark
21 Posts

Posted - 01/25/2006 :  12:15:44  Show Profile  Visit gispro's Homepage
Ah, a little premature. My intricate setup got the better of me :-(

Initially, PC1 called RepSvcs on PC3, that used the SQL Server on PC1. When I exchanged PC1 for PC2 as client, SERVERPROPERTY still returned PC1. So it seems I mistook the PC1 for meaning client, not backend database server. Which explains the behaviour, that now makes complete sense.

I keep looking.

--
GisPro
Go to Top of Page

gispro
Starting Member

Denmark
21 Posts

Posted - 02/07/2006 :  05:53:41  Show Profile  Visit gispro's Homepage
Ok, case closed. We ended up using another setup under which the client ID was unnecessary.

--
GisPro
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000