Hot answers tagged


The resolution to this issue was enabling service broker on the database as so. ALTER DATABASE [Database_name] SET NEW_BROKER WITH ROLLBACK IMMEDIATE; After enabling service broker for the database, drop users were practically instantaneous. Kin asked if the service broker was enabled in a previous comment which sent me searching in the right direction.


this is not an answer to the question but an argument to dismiss it altogether. If I understand correctly your comment: Within the context of refreshing DEV databases from production, I have to drop and recreate all database users. So yes dropping the database users and recreating them is necessary. your goal is to copy production data onto a dev ...


System databases cannot be mirrored or logshipping. The best way is to script and sync up desired objects e.g. logins, jobs, etc. The best tool that I have used so far for migrating databases, jobs, agent schedules, operators, logins, etc is powershell based


You might be asking too broad of a question but if you wanted to have a user only have access to a table in SQL Server you could simply do a: --Create Server Level User USE [master] GO CREATE LOGIN [(UserName)] WITH PASSWORD=N'PutPasswordHere' DEFAULT_DATABASE=[DatabaseName] GO --Create DB Level Uesr use [DatabaseName] GO CREATE USER (username) FOR LOGIN (...


For best practices on SQL Server security there are hundreds of pages of documentation from the DoD ("Security Installation Checklist" and "Security Checklist") and CIS ("SQL Server Security Benchmark"). This aside a more realistic approach is rooted in common sense. Your firewall should only allow access from the specific IPs in the DMZ only directly to ...

Only top voted, non community-wiki answers of a minimum length are eligible