Skip to content

Commit 016225d

Browse files
Standardize SQL syntax and casing in Repair-DbaDbOrphanUser
Changed 'exec' to 'EXEC' in sp_change_users_login procedure call to maintain consistent T-SQL keyword casing for case-sensitive collations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e569345 commit 016225d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/Repair-DbaDbOrphanUser.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function Repair-DbaDbOrphanUser {
153153
if ($server.versionMajor -gt 8) {
154154
$query = "ALTER USER " + $User + " WITH LOGIN = " + $User
155155
} else {
156-
$query = "exec sp_change_users_login 'update_one', '$User'"
156+
$query = "EXEC sp_change_users_login 'update_one', '$User'"
157157
}
158158

159159
if ($Pscmdlet.ShouldProcess($db.Name, "Mapping user '$($User.Name)'")) {

0 commit comments

Comments
 (0)