Repair Orphan Users All DBS
This procedure will resync all user/login sids, in all databases (unless limited). Excelent for use when restoring test environments.
2005-11-21 (first published: 2005-11-08)
1,749 reads
This procedure will resync all user/login sids, in all databases (unless limited). Excelent for use when restoring test environments.
2005-11-21 (first published: 2005-11-08)
1,749 reads
Quick and hassle free method of viewing the existing or non-existant primary keys in your database.
2005-11-16 (first published: 2005-10-28)
236 reads
Hello,Here is a way that help in getting all the table name and rowcount with in a database The use can give the database name and it will show the output for that database.Output can be ordered by name or by number of rows.To use it : Copy the script and run paste in QA […]
2005-11-14 (first published: 2005-10-24)
126 reads
Populate @list variable with account(s) to script. Save output to recreate:Login, Password,Default DB,Server Roles,DB Access,DB Roles,DB Object PermissionsDB level permissions are scripted in all databases. Can recreate a single login, or accepts comma delimted list of logins.NOTE:Stored procedures are created in Master, but are deleted
2006-01-19 (first published: 2005-10-19)
1,748 reads
The script is not as complete (and complex) as the USP_GetJobSchedules from M.Pearson, M. Austin and R.Sotkiewicz, but it gives a list of the scheduled jobs with start time, name, frequency, category and whether is enabled or not
2005-10-20 (first published: 2005-10-05)
436 reads
This script modifies another excellent script written by SHAS3. The original script examines tables for changes and sends an email. This modification examines all stored procedures, tables, indexes, etc. in ALL databases or just the CURRENT database. If changes are detected, the script has the option to either email or log to a table that […]
2005-10-26 (first published: 2005-09-28)
255 reads
I saw a posting recently of a DBA not being able to truncate a transaction log. I rememberred this script that I had, (downloaded from Microsoft Support many moons ago), which did the job for me. It basically filled the log with data, then truncated and shrank the log. All important points throughout the script […]
2005-10-28 (first published: 2005-09-26)
398 reads
I use this script to shrink the log files for development databases. The intention is keep the log files as small as possible when the database is not in use. By scheduling this script I can control when it happens as oppose to using auto shrink.
2005-07-08 (first published: 2005-06-29)
2,526 reads
This script sets the recovery model for all databases to simple. It also truncates the log files before shrinking the databases.
2006-12-19 (first published: 2005-06-03)
324 reads
There are many times you have to deploy a common code in all of your SQL Servers. I am sure there might be thousands of way to do this, but here is how I do it and it works great. Good thing is - you can either pass SQL Statement or a SQL script (in […]
2007-03-05 (first published: 2005-05-26)
821 reads
By John
Failing to plan is planning to fail. When organizations first begin implementing Azure networking,...
By Steve Jones
As I use containers more and more to run various things, I decided I...
By Kevin3NF
Old Reliable Still Matters If you’ve been around SQL Server for a while, you’ve...
I maintain an application written years ago, where the database is on a Windows...
I’m working on a jewelry e-commerce project and need advice on designing an efficient...
Comments posted to this topic are about the item The Duplicate Cursor
Can I run this code:
DECLARE ANewTable CURSOR FOR SELECT * FROM ANewTableSee possible answers