MSSQL sa添加服务器管理帐号的问题
服务器的密码被人给改了,现在只有MSSQL的sa帐号可以登陆数据库,在网上找个sql添加服务器管理员的命令
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user 新用户 密码 /add'
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net localgroup administrators 新用户 /add'
在master数据库那里新建查询,执行上面的语句,执行成功,还是登陆不了服务器