Script to sync all users to their respective logins
When restoring a database to a different server, this script will sync the users to the system logins. (as a relative newcomer, I'm pretty proud of this)
2002-05-23
447 reads
When restoring a database to a different server, this script will sync the users to the system logins. (as a relative newcomer, I'm pretty proud of this)
2002-05-23
447 reads
2002-05-22
226 reads
When you have a variable that hold a comma separated numbers like '1,2,3' and you have a table with a column that has the value that should match a number in that list, you can use this script to avoid building a string and then executing it.You have to convert the columnID to varchar, the […]
2002-05-20
375 reads
This stored procedure produces a report of record counts for every table on your server. The record count report is organized by database, and table name.
2002-05-16
645 reads
I have a set of data that I need to display in a random order each time I displayed it. There are several ways to do this, for example using a CURSOR to add each record to a temp table with a GUID, but a quick and dirty way to do this is to use […]
2002-05-16
501 reads
Since SQL Mail periodically stops working and the simplefix is to stop and start it, this script does just that.It can be scheduled to run as a task as often as desiredusing an ISQL command (e.g. isql -U sa -P -i "e:\dba\mailstopstart.sql" -o "e:\dba\mailstopstart.out")or as a stored procedure. It has been tested on SQL 6.5 […]
2002-05-16
1,143 reads
The information for backup size is stored in the backup_size column of the backupset table in the msdb database as the total bytes for that backup. This script allow you to look at the total back to tape or file so you can plan space needs for those devices. This is a simple piece of […]
2002-05-14
4,567 reads
Procedure that net sends a message to any user who logged in as SA.IN. had to use this once in the company where SA password was blank for a while and managment did not want to set a password on the account. You can also set it to work with any username or for users […]
2002-05-14
873 reads
Here is handy procedure to generate random number.I find it useful when I generate large amount of test data in a database.For example if you need to create a Customer Data and what they have purchased in the last month to run perfrmance tests on large amount of data an set up necessary indexes.You can […]
2002-05-13
648 reads
One thing that many people may do is disable a trigger temporarily to make changes without the trigger causing an issue. This is a simple way to quickly get all the triggers states in a database, so you can verify is it enabled or disabled.
2002-05-12
482 reads
Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...
The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...
By Brian Kelley
It tells us to take the time to master the foundational basics of whatever...
Hi All I am a complete novice so I apologise for any incorrect terminology....
Hi everyone I have two tables storing stock prices. Each table comes from a...
hi i need "sample size" in my report's 4th data region which is a...
What are the two inputs called to a hash join operation in SQL Server? (choose 2)
See possible answers