Re: Joins and dynamic filters with different users

From: Hank (sorry_at_noway.com)
Date: 11/24/04


Date: Wed, 24 Nov 2004 16:26:48 -0600

I've seen several examples in one line code snippets in the sql books where
they do something like this select <columns> from MyTable where
MyTable.LogonUserName = suser_sname()

This is what is leading me to believe that I might be able to match the
suser_sname() with a value that pre-exists in my server database. Does
anyone know of a way to do this?

"Paul Ibison" <Paul.Ibison@Pygmalion.Com> wrote in message
news:OchFHFm0EHA.2316@TK2MSFTNGP15.phx.gbl...
> Hank,
> as far as I remember this won't work. The SUSER_SNAME() function returns
the
> login of the sql server agent, which is the application that logs into the
> distributor/publisher. You'd be better off filtering using HOSTNAME and
> running the merge agent activex control with this as a parameter.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>



Relevant Pages

  • Re: Unable to Apply SP4 to SQL 2000 Cluster (new Node)
    ... Rebuild the node in the failover cluster. ... Scenario 1" in SQL Server 2000 Books Online. ... This setup process updates to SP4 only the binaries on the new ...
    (microsoft.public.sqlserver.clustering)
  • Re: WSS 3.0 question
    ... I followed the advise given in removing WSS 3.0 etc, ... the server is complaining that the SQL service(?) was tempered with or corrupt. ... I may just instal the SQL server as I was going eventuall use it anyway. ... If WSUS 3.0 is installed, I would suggest you uninstall it and then you install WSS 3.0. ...
    (microsoft.public.windows.server.sbs)
  • Re: SQL Server 2005 Cluster Setup Quiz
    ... I did test and it did not install the client tools. ... http://www.clusterhelp.com - Cluster Training ... Microsoft SQL Server MVP ... Provide a template on how to read SQL Server 2005 setup log files. ...
    (microsoft.public.sqlserver.clustering)
  • Re: WSUS
    ... I'm not seeing performance issues with the full enchilada installed, and 25 users busy hitting SQL. ... WSUS isn't difficult to uninstall - if you have WSUS v2 (installed with SBS R2) uninstall R2 from add/remove programs. ... How can anyone work with 4 instances of SQL Server on the same box? ...
    (microsoft.public.windows.server.sbs)
  • Re: Cannot setup SQL Mail on SBS 2003
    ... Microsoft CSS Online Newsgroup Support ... Cannot setup SQL Mail on SBS 2003 ... The account you use to start the SQL Server service must be a domain ...
    (microsoft.public.windows.server.sbs)