Drop User problem in Sql 2005 with agent
- From: "Philip Nelson" <panmanphil@xxxxxxxxxxxxxxxx>
- Date: Wed, 28 Jun 2006 09:54:51 -0500
In sql 2000 we had a tsql job that ran each day and restored a backup of a
database to a qa server. Because the backup was of a different user we ran a
follow up job that dropped one of the sql server users from the database and
re-added it with a login from the qa system.I updated the syntax to use the
new drop user commands so it's like
use [thedatabase]
go
DROP USER theUser
go
CREATE USER [theUser] FOR LOGIN [theLogin] WITH DEFAULT_SCHEMA=[dbo]
go
This works perfectly from a management studio window but from the job we get
the message below. It is the drop user statement that causes the error. I
have verified that this user does not own any schema's, and the error that
generates is different anyway. Suggestions?
Executed as user: PLANADMIN\servsql. String or binary data would be
truncated. [SQLSTATE 22001] (Error 8152) The statement has been terminated.
[SQLSTATE 01000] (Error 3621). The step failed.
.
- Follow-Ups:
- Re: Drop User problem in Sql 2005 with agent
- From: Uri Dimant
- Re: Drop User problem in Sql 2005 with agent
- Prev by Date: Re: SQLAGENTSERVER startup!
- Next by Date: Re: Drop User problem in Sql 2005 with agent
- Previous by thread: SQLAGENTSERVER startup!
- Next by thread: Re: Drop User problem in Sql 2005 with agent
- Index(es):
Relevant Pages
|
|