how to remove all permissions in a database?
This should help drop all users after restore.
declare @sql nvarchar(max)

set @sql = ''

select @sql = @sql + '
print ''Dropping ' + name + '''drop user ' + name + ''
from dbo.sysusers
where name not in ('dbo', 'guest', 'INFORMATION_SCHEMA', 'sys', 'public') and LEFT(name, 3) &lt;&gt; 'db_'
order by name

--print @sql
execute (@sql)