Reputation: 11
I have a database that I am migrating, but when I do the restore all the users of that database are also migrated.
Is there any way to do a restore of the DB only of the data? Without the users/roles
Or any way to remove all users from the DB?
In total there are 15BBDD with +50 users.
Upvotes: 1
Views: 1859
Reputation: 18559
In Management Studio, you can right click on your database, select Tasks
then Generate Scripts...
On Choose Objects
screen choose users you want to remove, or all.
On Set scripting options
page, go to Advanced
, find Script DROP and CREATE
and choose option to only Script DROP
Select option to open in a new query window.
Next, next, finish and you'll have your script to drop all users.
Upvotes: 1