Client invoked the procedure.

  • Hi,

    Is there any way that i can find out the client connected to the server using linked servers?

    Say i have a server (running on 2008). I need to create a procedure which will log all the instance names that accessed the the procedure using linked servers? Assume client are running on SQL Server 2000.

    For remote severs i could see one global parameter @@RemoteServer that will have the remote server name that made the call. Is there anything similar to linked servers?

    Please reply me ASAP.

    Regards,

    -Chandra.

  • Hi,

    Logging everyone who accessed an object is easy, just add the logging code to the proc. (SELECT SYSTEM_USER)

    However I'm pretty sure there's no native way to determine if someone connected via Query Analyzer or a linked server. One way to work around it is to have linked server users access call a different proc, or setup your linked servers are setup to authenticate as a specific user. (But this could have security implications)

    If the latter, you will then be able to differentiate and log accordingly.

    Chris.

    Chris.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply