I have the task of moving a DB to a new server. I performed a full backup of the DB. Is there a script in which when I restore the DB, the users and roles are included?
Database roles and users are included in a full backup, so when you restore it, they'll be in the database. You'll need to be sure that the logins that the users are mapped to are also created in the new instance. This article describes how to do that: