I have requirement that I need to take backup from production and need to restore it in development.
I have taken all users and permissions from production by generating scripts, but two users are facing an issue in the development copy because they do not have permission to CREATE
,ALTER
and EXECUTE
. When I used the generate script feature to get their permissions from production, they are only db_reader
and db_writer
. But now they are getting errors like "execute permissions denied in stored procedure". Prior they were able to CREATE
,ALTER
, and DROP
stored procedures successfully.
How is this possible? My question is will the db_writer
role allow a user to CREATE
and DROP
stored procedures?
Best Answer
The answer is
NO
.db_datawriter
can only doINSERT
,UPDATE
,DELETE
.There could be a case when some user was the
owner
of that database, so it had the permissions ofdb_owner
in this database, and afterrestore
theowner
was changed, but it cannot be your case as you have two users that now have notEXECUTE
permission.