Audit SQL Logins - Updated
SQL Auditing - Generate a listing of the SQL logins, and the permissions for each database on a server.
Update to Simon Facer's script.
2011-05-23 (first published: 2007-09-25)
13,403 reads
SQL Auditing - Generate a listing of the SQL logins, and the permissions for each database on a server.
Update to Simon Facer's script.
2011-05-23 (first published: 2007-09-25)
13,403 reads
2011-05-23
328 reads
Query Active Directory to get information on user logins.
2011-05-19 (first published: 2011-05-16)
3,880 reads
Stored procedure to backup all DB (chose user or system). You can do full, differential and log backups
2011-05-13 (first published: 2011-05-06)
3,146 reads
View login information for all accounts that use SQL authentication.
2011-05-12 (first published: 2011-05-09)
2,969 reads
Find the last day (or number of days in a month) in one statement without having to use IFs or BUTs.
2011-05-10 (first published: 2011-04-29)
2,433 reads
This script is used for drop and create a new or existing user. IF User is already exists in database then first it will dropped and then recreate.
2011-05-05 (first published: 2011-04-28)
1,812 reads
Excel files includes a very good functionality called Macro execution. And here we can use this functionality to write one macro that will generate INSERT statements.
2011-05-02 (first published: 2009-02-21)
16,628 reads
Returns Top 25 fragmented indexes complete with full object name and index name.
2011-04-29 (first published: 2009-05-29)
10,013 reads
Remove tab,line feed and carriage return frome text field
2011-04-28 (first published: 2011-04-21)
3,361 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
Comments posted to this topic are about the item Split Large Queries in Athena...
Comments posted to this topic are about the item Finding Trailing Spaces
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers