Re: HELP..

From: Shamim (shamim.abdul@railamerica.com)
Date: 07/11/02


From: "Shamim" <shamim.abdul@railamerica.com>
Date: Thu, 11 Jul 2002 10:30:17 -0500


Again...what will be the output for a suser_sname() inside a SP which is
being executed thru a SQL JOB which is scheduled.
I tested the above and got a login which is not listed under the logins in
EnterpriseManager.

Thanks
Shamim

"Shamim" <shamim.abdul@railamerica.com> wrote in message
news:OfzXykOKCHA.2520@tkmsftngp08...
> Same code - suser_name() picks data for some server/database while in
> another its NULL.
> All databases are in SQL SERVER 7.0
>
> Do I have to chk any database settings which is different ???
>
> Thanks
> Shamim
>
>
>
> "Tibor Karaszi"
<tibor.please_reply_to_public_forum.karaszi@cornerstone.se>
> wrote in message news:#uFd3cKKCHA.2548@tkmsftngp11...
> > ... or, to be ANSI SQL compliant, SYSTEM_USER
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> > "Tobias Thernström" <tt@rbam_nospam.se> wrote in message
> news:eT0gyCFKCHA.1684@tkmsftngp08...
> > > suser_name() is always NULL for Windows Logins, it is only there for
> > > backwards compability. Always use suser_Sname().
> > >
> > > / Tobias
> > >
> > > "Shamim" <shamim.abdul@railamerica.com> wrote in message
> > > news:#w5729EKCHA.2160@tkmsftngp10...
> > > > I tried by making the owner of the job as 'sa' and starting the job
> > > manually
> > > > and scheduled ...both times suser_name() is NULL.
> > > >
> > > > Pls Help
> > > >
> > > > Thanks
> > > > Shamim
> > > >
> > > >
> > > > "Aaron Bertrand [MVP]" <aaronATaspfaq.com> wrote in message
> > > > news:ufxlOGEKCHA.2592@tkmsftngp08...
> > > > > Well, first things first... did you try it?
> > > > >
> > > > > --
> > > > > www.aspfaq.com / www.perfhound.com
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Shamim" <shamim.abdul@railamerica.com> wrote in message
> > > > > news:eVK55$DKCHA.2604@tkmsftngp08...
> > > > > > HI All,
> > > > > > SQL SERVER 7.0
> > > > > >
> > > > > > I created a SQL job which executes a stored procedure. Owner of
> the
> > > job
> > > > is
> > > > > > 'dbadmin',
> > > > > > If i use SUSER_NAME() inside my stored procedure - what will be
> the
> > > > value
> > > > > > ???
> > > > > >
> > > > > > Thanks
> > > > > > Shamim
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Priviledges problem with "execute master..xp_logevent&q
    ... Here is what I experienced when trying to get the logging into SQL ... If I execute the DTS package from Enterprise Manager using a SQL ... If I create a SQL job from the DTS package and run that sql job using ...
    (microsoft.public.sqlserver.dts)
  • RE: Stopping certain applications from connecting to the server
    ... You can also create a SQL Job that executes a SQL batch that polls the ... For instance, under Management (Enterprise Manager), I find ... > connecting to the SQL Server in the future (deny the connection when it ...
    (microsoft.public.sqlserver.programming)
  • Re: Errr VSS service
    ... error messages. ... What SQL Job? ... Mark Allison, SQL Server MVP ... Looking for a SQL Server replication book? ...
    (microsoft.public.sqlserver.server)
  • Re: SQL Cluster/Cant execute SSIS package using a proxy acc in sql jo
    ... If it is not clustered, did you install it on all cluster nodes separately? ... Microsoft SQL Server MVP ... if I run the sql job as "SQL Agent account" it works fine ... I've this running with no problems on a non-cluster sql server (5 diff ...
    (microsoft.public.sqlserver.clustering)
  • Re: Access 2007->SQL Server2005 "connection was forcibly closed",G
    ... I moved every table I was able to move to the SQL ... closed connections - but all of these errors are in the version which used ... the SQL Server 2000 and everything worked ... communication between ODBC (OLEDB and Native Client, ...
    (microsoft.public.sqlserver.connect)