New answers tagged

2

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 dbatools.io


1

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 ...


0

I was having the same problem and I was finding this in the mysql error log: 2016-06-14T14:09:02.742036Z 0 [Warning] Failed to set up SSL because of the following SSL library error: Unable to get private key After much tinkering, I found the solution, which is to run this openssl command to get a new server key: openssl rsa -in server-key.pem -out ...


0

First try DROP SCHEMA schema_name If the schema contains objects, the DROP statement fails. Why? I was trying to transfer a scheme that existed on a user account that came over when a database moved. I needed to delete the user but was getting hung-up on the schema that came with it. The schema matched the user name. I tried the solution at this ...


6

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.


3

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 ...


0

A cursor similar to this should work Use DB_name declare @username varchar(50) declare user_cursor cursor for select '['+name+']' from sys.database_principals where type in ('u', 's') and principal_id>4 open user_cursor fetch next from user_cursor into @username while (@@fetch_status=0) begin EXEC sp_dropuser @username fetch next from user_cursor into @...



Top 50 recent answers are included