Re: HELP..
From: Shamim (shamim.abdul@railamerica.com)
Date: 07/11/02
- Next message: Shamim: "SUSER_SNAME() INSIDE A SP"
- Previous message: Dinesh TK: "Re: Database compatibilty level"
- In reply to: Shamim: "Re: HELP.."
- Next in thread: Tibor Karaszi: "Re: HELP.."
- Reply: Tibor Karaszi: "Re: HELP.."
- Reply: Tobias Thernström: "Re: HELP.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Shamim: "SUSER_SNAME() INSIDE A SP"
- Previous message: Dinesh TK: "Re: Database compatibilty level"
- In reply to: Shamim: "Re: HELP.."
- Next in thread: Tibor Karaszi: "Re: HELP.."
- Reply: Tibor Karaszi: "Re: HELP.."
- Reply: Tobias Thernström: "Re: HELP.."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|