复制代码 代码如下:
declare @cmd nvarchar(4000)
set @cmd = N'exec [?].sys.sp_change_users_login @Action = ''Auto_Fix''
, @UserNamePattern = ''qa''
, @LoginName = null
, @Password = ''abc'' '
exec sp_msforeachdb @cmd
时间: 2024-09-26 03:29:49
复制代码 代码如下:
declare @cmd nvarchar(4000)
set @cmd = N'exec [?].sys.sp_change_users_login @Action = ''Auto_Fix''
, @UserNamePattern = ''qa''
, @LoginName = null
, @Password = ''abc'' '
exec sp_msforeachdb @cmd