Saturday, February 25, 2012

permission issues with database roles

Hello,
Does somebody knows or have a complete solution, for resolving the following
issues
when moving or copying a database to another sql server?
- when attaching the moved database, i have orphan users. I can use the
sp_help_revlogin to re-create those users. This works ok.
- when attaching a database which has roles and permissions defined, the
only thing that gets fixed are the logins. The login created by the
sp_help_revlogin can access the database, but if i do a simple select
statement, i'm getting a error about permissions.
In the meantime, i've also tried the mapsid.exe, but still no luck. Maybe i
did something wrong i don't know.
I hope somebody has faced this problem before and can give me a solution.
ThnxHi
The correct procedure is to script the users out and then remove the users
from the DB before you detach the DB.
Regards
Mike
"Ezeki?l" wrote:

> Hello,
> Does somebody knows or have a complete solution, for resolving the followi
ng
> issues
> when moving or copying a database to another sql server?
> - when attaching the moved database, i have orphan users. I can use the
> sp_help_revlogin to re-create those users. This works ok.
> - when attaching a database which has roles and permissions defined, the
> only thing that gets fixed are the logins. The login created by the
> sp_help_revlogin can access the database, but if i do a simple select
> statement, i'm getting a error about permissions.
> In the meantime, i've also tried the mapsid.exe, but still no luck. Maybe
i
> did something wrong i don't know.
> I hope somebody has faced this problem before and can give me a solution.
> Thnx
>
>|||Hi Mike,
Can you tell me how? Because what you're saying is the opposite what the
instructions says of sp_help_revlogin.
I used sp_help_revlogin on the source db to get me a script to create the
logins on the destination server. Next i detached the db an attached it on
the destination server. Now if i don't have database roles, it would work.
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:8FF81982-6018-4D46-9EEE-2404D9015CF2@.microsoft.com...[vbcol=seagreen]
> Hi
> The correct procedure is to script the users out and then remove the users
> from the DB before you detach the DB.
> Regards
> Mike
> "Ezekil" wrote:
>
following[vbcol=seagreen]
Maybe i[vbcol=seagreen]
solution.[vbcol=seagreen]

No comments:

Post a Comment