on 2011 Dec 01 5:24 AM
A while ago we dropped some xp_real-functions in a production database,
because of some security issues.
How can we recreate these functions?
Executing the following create statement as DBA:
create function dbo.xp_real_cmdshell( in command varchar(8000) default null, in redir_output char(254) default '' ) returns integer internal name 'xp_real_cmdshell' go
results in an error message:
Could not execute statement.
Permission denied: you do not have permission to use
the "CREATE FUNCTION" statement
SQLCODE=-121, ODBC 3 State="42000"
Line 1, column 1
Does anybody know how to solve this problem?
Request clarification before answering.
There isn't a way to do this on an existing database that I know of - the server will not permit anyone (including a DBA) to link a new procedure to an internal server mechanism.
To get the system procedures back, dbinit a new database, and do an unload/reload into it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
39 | |
15 | |
9 | |
7 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.