Re: User Permissions disappearing



Hi Andrew

Thanks for that. Unfortunately it's 11pm at night here (Australia) and I'm
now struggling to follow the articles.

I don't actually want to move users. I'm happy to delete every user and
recreate everything from scratch. Unfortunately even after deleting all
relevant users and the databases on the new server, and then recreating the
database and re-adding the users, it still won't let me attach the users to
the database.

When I do add them, they appear in the users list in the database, but the
server information in security doesn't get updated. The information then
held in the server can then get "deleted", but the information in the
database remains. If you try adding it again, you get a "the user is already
in the database" error.

I have tried running the application without the information in the security
section - just in the database users section. But the application still
crashes.

sp_helplogins is showing no links between these users and the databases
unless I create them.

Sorry for rambling. The brain is slowing down.

"Andrew J. Kelly" wrote:

Derek,

Here is some good info related to moving dbs and reestablishing permissions
that you may want to have a look at:


http://vyaskn.tripod.com/moving_sql_server.htm Moving DBs
http://msdn2.microsoft.com/en-us/library/ms345408(en-US,SQL.90).aspx Moving
system dbs 2005
http://www.databasejournal.com/features/mssql/article.php/3379901 Moving
system DB's 2000
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://www.support.microsoft.com/?id=221465 Using WITH MOVE in a Restore
http://www.sqlservercentral.com/columnists/cBunch/movingyouruserswiththeirdatabases.asp
Moving Users
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after
a Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=320125 Moving a Diagram
http://www.support.microsoft.com/?id=274463 Copy DB Wizard issues 2000

http://www.sqlservercentral.com/scripts/contributions/1598.asp Script
Roles and Permissions

--
Andrew J. Kelly SQL MVP


"Derek" <Derek@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:548BDD73-84E8-4E4A-A1EC-3DBB6B29BB26@xxxxxxxxxxxxxxxx
I have a SQL Server 2000 database that I'm copying from the Dev environment
into the Test environment.

The steps I follow are
1) Create the database.
2) Restore the database from the backup made on the other server.
3) Add permissions for the user group to access it.

I'm having problems with step 3. I look at the properties of the user
group. I alter the database access to give access to the group. I close
down. I look at the properties and the tick has disappeared.

The application doesn't run, which confirms the permissions have not been
set.

I have no problems running on another test environment (don't ask why we
have two).



.



Relevant Pages

  • RE: copy permissions from one user to another?
    ... THIS STORED PROCEDURE GENERATES COMMANDS ... -- ADD USER TO SERVER ... -- CREATE TABLE TO HOLD LIST OF USERS IN CURRENT DATABASE ... -- SET COMMAND TO FIND USER PERMISSIONS HAS IN CURRENT DATABASE ...
    (microsoft.public.sqlserver.security)
  • Re: Effective Permissions Error with Domain User
    ... I set the database compatibility to 2005. ... server profile trace and found that it was calling the Execute As User. ... This leads me to believe it is some sort of permissions issue. ... Did you get these database from SQL Server 2000 by using a RESTORE command? ...
    (microsoft.public.sqlserver.security)
  • Re: How to prevent DELETEs in a table
    ... It is the dbo database USER, not server-level groups, that determins ... It has implicit permissions that can not be denied. ... SQL Server just skips any permission validation for sysadmins. ...
    (microsoft.public.sqlserver.server)
  • Re: object level permissions being lost when migrating
    ... While I understand that the permissions are at the ... Database level, that is why I am not understanding why I have an issue. ... Moving Users ... Errors After Restoring Dump ...
    (microsoft.public.sqlserver.security)
  • Re: Disable Sysadmin to view metadata in SQL2005
    ... you are looking for a DRM solution for your database. ... Server does not provide such a solution. ... SQL Server Engine ... If the permissions are not granular ...
    (microsoft.public.sqlserver.security)