DB Role | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

DB Role

Hi
quick question…
If I am restoring a database, is there a chance to delete/modify any DB role by itself? Thanks!
"He laughs best who laughs last"
As far I know, no. Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
Database role are a way to assign permissions to logins. There are those that always exist (db_owner, etc.) and those that you create yourself (custom roles). You can drop the custom roles without any problem, just that the logins depending on membership of that role for certain permissions will no longer have those permissions.
When you restore the database all the permission and roles from that backup file will be applied to the restored database and as specified you can modify the roles accordingly. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
quote:Originally posted by Reddy
If am iam restoring a database is there a chance to delete/modify any DB role by itself?

I realise there is a language issue here, but it’s not clear what you are asking; If you are worried about losing user-defined database roles, they are contained in the database they relate to. So if your backup was taken before you created the role, yes – you will lose the database role. If you are worried about a fixed database role – they can’t be deleted or modified.

All the permissions on the target database will be replaced with the source database when you restore. I think Mulhall’s response is more clear in this sense. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>