Re: Setuser failed?



gurbao (audunj@xxxxxxxxx) writes:
I have recently migrated from sql server 2000 to 2005.
One of my old jobs is currenty failing with

Msg 15157, Sev 11, State 1: Setuser failed because of one of the
following reasons: the database principal 'sa' does not exist, its
corresponding server principal does not have server access, this type
of database principal cannot be impersonated, or you do not have
permission. [SQLSTATE 42000]

The jobs calls a procedure that again uses sp_makewebtask. It is this
proc that throws the above error.

Someone with a clue on what I should do to resolve this?

Both SETUSER and sp_makewebtask are deprecated, so in the long run, you
should probably look into to replace the code.

It wasn't clear to me: who is doing SETUSER on 'sa'? sp_makewebtask
or the procedure that calls it? If the latter, can you post the code?


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • CUPS problem printing pictures is very slow
    ... all jobs) and everything is working very well, ... # Server name ... # Browse order (BrowseOrder) ... # Whether or not to use implicit classes. ...
    (Debian-User)
  • CUPS problem printing is slow
    ... all jobs) and everything is working very well, ... # Server name ... # Browse order (BrowseOrder) ... # Whether or not to use implicit classes. ...
    (Debian-User)
  • Re: Move SQL Server to new hardware
    ... The machine name for your SQL Server agent jobs. ... Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)
  • Re: strange problem with send() and recv()
    ... > I try to write a simple tcp based job queue server. ... > get commands from a client and store them in a queue. ... > The client can query the server about the jobs currently queued. ...
    (comp.lang.c)
  • Re: Move SQL Server to new hardware
    ... Restore http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to ... > thinks that this job is owned by a master server. ... > the machine names for all jobs with below SQL Statement. ... > Tibor Karaszi, SQL Server MVP ...
    (microsoft.public.sqlserver.server)