删除/恢复SQL server危险的存储过程方法 有需要的朋友可参考一下本文章。
清除SQL Server 2000所有的危险扩展存储过程
--清除完后,需要对xplog70.dll文件进行改名
--不知道使用的是那个动态库可以查询sp_helpextendedproc xp_cmdshell
---------------------------------------------------------------------------
--删除扩展存储过程后会存在的问题
--xp_cmdshell [删除此项扩展后,将无法远程连接数据库]
--xp_dirtree [删除此项扩展后,将无法新建或附加数据库] 恢复备份时被使用,非必要请勿删除
--Xp_regread [删除此项扩展后,还原数据库辅助] 恢复备份时被使用,非必要请勿删除
--xp_fixeddrives [删除此项扩展后,将无法还原数据库] 恢复备份时被使用,非必要请勿删除
--Sp_OACreate [删除后会造成企业管理器中的某些功能无法使用]
--Sp_OADestroy [删除后会造成企业管理器中的某些功能无法使用]
--Sp_OAGetErrorInfo [删除后会造成企业管理器中的某些功能无法使用]
--Sp_OAGetProperty [删除后会造成企业管理器中的某些功能无法使用]
--Sp_OAMethod [删除后会造成企业管理器中的某些功能无法使用]
--Sp_OASetProperty [删除后会造成企业管理器中的某些功能无法使用]
--Sp_OAStop [删除后会造成企业管理器中的某些功能无法使用]
---------------------------------------------------------------------------
--各个扩展存储过程的说明
--xp_cmdshell --它可以执行操作系统的任何指令
--xp_dirtree --用来列出对应目录下的文件和文件夹
--xp_enumgroups --列出当前系统的使用群组及其说明
--xp_fixeddrives --列表所有驱动器名和每个驱动器上的空闲空间大小
--xp_loginconfig --一些服务器安全配置的信息
--xp_enumerrorlogs --枚举域名相关信息
--xp_getfiledetails --
--Sp_OACreate --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Sp_OADestroy --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Sp_OAGetErrorInfo --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Sp_OAGetProperty --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Sp_OAMethod --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Sp_OASetProperty --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Sp_OAStop --OLE自动存储过程,危险性不亚于xp_cmdshell,删除后会造成企业管理器中的某些功能无法使用
--Xp_regaddmultistring --
--Xp_regdeletekey --可以删除注册表指定的键
--Xp_regdeletevalue --可以删除注册表指定的键里指定的值
--Xp_regenumkeys --枚举
--Xp_regenumvalues --
--Xp_regread --可以读取注册表指定的键里指定的值
--Xp_regremovemultistring --
--Xp_regwrite --可以写入注册表指定的键里指定的值
--sp_makewebtask --
---------------------------------------------------------------------------
--删除
use master
exec sp_dropextendedproc 'xp_cmdshell'
--exec sp_dropextendedproc 'xp_dirtree'
exec sp_dropextendedproc 'xp_enumgroups'
--exec sp_dropextendedproc 'xp_fixeddrives'
exec sp_dropextendedproc 'xp_loginconfig'
exec sp_dropextendedproc 'xp_enumerrorlogs'
exec sp_dropextendedproc 'xp_getfiledetails'
exec sp_dropextendedproc 'Sp_OACreate'
exec sp_dropextendedproc 'Sp_OADestroy'
exec sp_dropextendedproc 'Sp_OAGetErrorInfo'
exec sp_dropextendedproc 'Sp_OAGetProperty'
exec sp_dropextendedproc 'Sp_OAMethod'
exec sp_dropextendedproc 'Sp_OASetProperty'
exec sp_dropextendedproc 'Sp_OAStop'
exec sp_dropextendedproc 'Xp_regaddmultistring'
exec sp_dropextendedproc 'Xp_regdeletekey'
exec sp_dropextendedproc 'Xp_regdeletevalue'
exec sp_dropextendedproc 'Xp_regenumkeys'
exec sp_dropextendedproc 'Xp_regenumvalues'
--exec sp_dropextendedproc 'Xp_regread'
exec sp_dropextendedproc 'Xp_regremovemultistring'
exec sp_dropextendedproc 'Xp_regwrite'
drop procedure sp_makewebtask
go
---------------------------------------------------------------------------
--恢复
use master
exec sp_addextendedproc xp_cmdshell,'xplog70.dll'
exec sp_addextendedproc xp_dirtree,'xpstar.dll'
exec sp_addextendedproc xp_enumgroups,'xplog70.dll'
exec sp_addextendedproc xp_fixeddrives,'xpstar.dll'
exec sp_addextendedproc xp_loginconfig,'xplog70.dll'
exec sp_addextendedproc xp_enumerrorlogs,'xpstar.dll'
exec sp_addextendedproc xp_getfiledetails,'xpstar.dll'
exec sp_addextendedproc sp_OACreate,'odsole70.dll'
exec sp_addextendedproc sp_OADestroy,'odsole70.dll'
exec sp_addextendedproc sp_OAGetErrorInfo,'odsole70.dll'
exec sp_addextendedproc sp_OAGetProperty,'odsole70.dll'
exec sp_addextendedproc sp_OAMethod,'odsole70.dll'
exec sp_addextendedproc sp_OASetProperty,'odsole70.dll'
exec sp_addextendedproc sp_OAStop,'odsole70.dll'
exec sp_addextendedproc xp_regaddmultistring,'xpstar.dll'
exec sp_addextendedproc xp_regdeletekey,'xpstar.dll'
exec sp_addextendedproc xp_regdeletevalue,'xpstar.dll'
exec sp_addextendedproc xp_regenumvalues,'xpstar.dll'
exec sp_addextendedproc xp_regread,'xpstar.dll'
exec sp_addextendedproc xp_regremovemultistring,'xpstar.dll'
exec sp_addextendedproc xp_regwrite,'xpstar.dll'
go

MySQLdiffersfromotherSQLdialectsinsyntaxforLIMIT,auto-increment,stringcomparison,subqueries,andperformanceanalysis.1)MySQLusesLIMIT,whileSQLServerusesTOPandOracleusesROWNUM.2)MySQL'sAUTO_INCREMENTcontrastswithPostgreSQL'sSERIALandOracle'ssequenceandt

MySQL partitioning improves performance and simplifies maintenance. 1) Divide large tables into small pieces by specific criteria (such as date ranges), 2) physically divide data into independent files, 3) MySQL can focus on related partitions when querying, 4) Query optimizer can skip unrelated partitions, 5) Choosing the right partition strategy and maintaining it regularly is key.

How to grant and revoke permissions in MySQL? 1. Use the GRANT statement to grant permissions, such as GRANTALLPRIVILEGESONdatabase_name.TO'username'@'host'; 2. Use the REVOKE statement to revoke permissions, such as REVOKEALLPRIVILEGESONdatabase_name.FROM'username'@'host' to ensure timely communication of permission changes.

InnoDB is suitable for applications that require transaction support and high concurrency, while MyISAM is suitable for applications that require more reads and less writes. 1.InnoDB supports transaction and bank-level locks, suitable for e-commerce and banking systems. 2.MyISAM provides fast read and indexing, suitable for blogging and content management systems.

There are four main JOIN types in MySQL: INNERJOIN, LEFTJOIN, RIGHTJOIN and FULLOUTERJOIN. 1.INNERJOIN returns all rows in the two tables that meet the JOIN conditions. 2.LEFTJOIN returns all rows in the left table, even if there are no matching rows in the right table. 3. RIGHTJOIN is contrary to LEFTJOIN and returns all rows in the right table. 4.FULLOUTERJOIN returns all rows in the two tables that meet or do not meet JOIN conditions.

MySQLoffersvariousstorageengines,eachsuitedfordifferentusecases:1)InnoDBisidealforapplicationsneedingACIDcomplianceandhighconcurrency,supportingtransactionsandforeignkeys.2)MyISAMisbestforread-heavyworkloads,lackingtransactionsupport.3)Memoryengineis

Common security vulnerabilities in MySQL include SQL injection, weak passwords, improper permission configuration, and unupdated software. 1. SQL injection can be prevented by using preprocessing statements. 2. Weak passwords can be avoided by forcibly using strong password strategies. 3. Improper permission configuration can be resolved through regular review and adjustment of user permissions. 4. Unupdated software can be patched by regularly checking and updating the MySQL version.

Identifying slow queries in MySQL can be achieved by enabling slow query logs and setting thresholds. 1. Enable slow query logs and set thresholds. 2. View and analyze slow query log files, and use tools such as mysqldumpslow or pt-query-digest for in-depth analysis. 3. Optimizing slow queries can be achieved through index optimization, query rewriting and avoiding the use of SELECT*.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
