How to fix Orphaned Users
To view if there are any orphaned users, run this query against the DB;
sp_change_users_login ‘report’
To fix;
sp_change_users_login ‘update_one’, ‘dbUser’, ‘sqlLogin’
2010-08-31
1,893 reads
To view if there are any orphaned users, run this query against the DB;
sp_change_users_login ‘report’
To fix;
sp_change_users_login ‘update_one’, ‘dbUser’, ‘sqlLogin’
2010-08-31
1,893 reads
SELECT cpu_count/hyperthread_ratio AS cores FROM sys.dm_os_sys_info;
2010-08-31
1,683 reads
Or “Plan cache monitoring – insert and remove”
Previously I took a look at the CacheHit and CacheMiss events to see how...
2010-08-31
1,822 reads
for Sql server 2005, It was a bug when you modify maintainance plan you may get the error “no description...
2010-08-31
2,776 reads
This is a reminder for those who might be considering submitting a session but haven't yet. The call for speakers...
2010-08-31
1,406 reads
Prior to creating SQLRally the world of PASS consisted of the PASS Summit which is our annual mega-event, the European...
2010-08-31
1,837 reads
According to Conor Cunningham, it doesn’t.
I have heard that there are issues in the optimizer, and to be sure, there...
2010-08-31
1,834 reads
Unlike fine wine, database statistics do not improve with age. I recently helped out with a client who was having...
2010-08-30
10,973 reads
We are here again after another week and ready for another episode in this series. Today we get to talk...
2010-08-30
1,773 reads
I am trying to gather some information about some of the newer Intel and AMD processors as part of my...
2010-08-30
1,900 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