after restore database from another server to a new server, i cannot delete
the past user attached to the database.
some objects are attached to the user, the user cannot be dropped.
how can i remove the user.
i saw some solutions but cannot search them out.
grateful for any assistance.
tonyHave you looked at the Microsoft supplied stored procedure
sp_change_users_login?
Keith Kratochvil
"tony wong" <x34@.netvigator.com> wrote in message
news:OsxhRcXhGHA.3956@.TK2MSFTNGP02.phx.gbl...
> after restore database from another server to a new server, i cannot
> delete the past user attached to the database.
> some objects are attached to the user, the user cannot be dropped.
> how can i remove the user.
> i saw some solutions but cannot search them out.
> grateful for any assistance.
> tony
>
>|||seems not worked
let me explain in more details
i find the said login (to be removed) owns 3 tables in the old database.
when it is restored at a new server, i cannot delete the said login
once i delete these 3 tables, the said login can be deleted ( but it is not
a solution to me)
how can i change the owner of these 3 tables back to 'sa'?
Thanks a lot.
tony
"Keith Kratochvil" <sqlguy.back2u@.comcast.net> glsD:O5na4pXhGHA.4864@.TK2MSFTNGP05.
phx.gbl...
> Have you looked at the Microsoft supplied stored procedure
> sp_change_users_login?
> --
> Keith Kratochvil
>
> "tony wong" <x34@.netvigator.com> wrote in message
> news:OsxhRcXhGHA.3956@.TK2MSFTNGP02.phx.gbl...
>|||fixed by sp_changeobjectowner
thanks a lot
"Tony WONG" <x34@.hknet.com> glsD:u6TbsuehGHA.1856@.TK2MSFTNGP03.phx.gbl...agreen">
> seems not worked
> let me explain in more details
> i find the said login (to be removed) owns 3 tables in the old database.
> when it is restored at a new server, i cannot delete the said login
> once i delete these 3 tables, the said login can be deleted ( but it is
> not a solution to me)
> how can i change the owner of these 3 tables back to 'sa'?
> Thanks a lot.
> tony
>
> "Keith Kratochvil" <sqlguy.back2u@.comcast.net> glsD:O5na4pXhGHA.
4864@.TK2MSFTNGP05.phx.gbl...
>|||Glad to help. In SQL Server 2000 it is usually recommended to have objects
owned by dbo, not users.
Keith Kratochvil
"Tony WONG" <x34@.hknet.com> wrote in message
news:OQdl30ehGHA.3496@.TK2MSFTNGP04.phx.gbl...
> fixed by sp_changeobjectowner
> thanks a lot
>
> "Tony WONG" <x34@.hknet.com>
> glsD:u6TbsuehGHA.1856@.TK2MSFTNGP03.phx.gbl...
>sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment