Home > Database > Mysql Tutorial > sqlserver数据库迁移后,孤立账号解决办法

sqlserver数据库迁移后,孤立账号解决办法

WBOY
Release: 2016-06-07 18:02:51
Original
811 people have browsed it

sqlserver数据库迁移后,孤立账号解决办法,需要的朋友可以参考下。

代码如下:
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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template