My computer has been infected with 1433 viruses recently, and SQL server has encountered more than N exceptions.
After the reinstallation, it still does not work. There is no way to use it on your own, so you can only find information on the Internet.
Step 1: Delete the sp_dropextendedproc and sp_addextendedproc stored procedures
Drop procedure sp_addextendedproc
Drop procedure sp_dropextendedproc
Step 2: recreate the two stored procedures
Create procedure DBO. sp_dropextendedproc
@functname nvarchar(517) -- name of function as -- If we're in a transaction, disallow the dropping of the -- extended stored procedure. set implicit_transactions off if @@trancount > 0 begin raiserror(15002,-1,-1,'sys.sp_dropextendedproc') return (1) end -- Drop the extended procedure mapping. dbcc dropextendedproc( @functname ) return (0) -- sp_dropextendedproc
go
create procedure sp_addextendedproc --- 1996/08/30 20:13
@functname nvarchar(517),/* (owner.)name of function to call */
@dllname varchar(255)/* name of DLL containing function */
as
set implicit_transactions off
if @@trancount > 0
begin
raiserror(15002,-1,-1,'sp_addextendedproc')
return (1)
end
dbcc addextendedproc( @functname, @dllname)
return (0) -- sp_addextendedproc
GO
Step 3: delete xp_cmdshell
exec sp_dropextendedproc 'xp_cmdshell'
Step 4: Restore the deleted stored procedure, for example:
Exec sp_addextendedproc 'SP _ trace_setevent', 'xpweb70. dll'
In this case, you can use it. Because xp_cmdshell is rarely used, this is not required.
Annoying virus.