中国开发网: 论坛: 程序员情感CBD: 贴子 490871
haitao
试验及搜索的结果
服务器: 消息 15281,级别 16,状态 1,过程 xp_cmdshell,行 1
SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.



你是用的SQL2000还是SQL2005试的,我以前那个不是用的OPENROWSET做的吗,这个OPENDATASOUSE以前用就不好用,是在2000上试的,现在我们的程序和数据库都换成2005的了,这个上面连我以前的那个都不好使了,我执行下面的语句:select * into serv_user_bak
from OpenRowSet('microsoft.jet.oledb.4.0','Excel 8.0;database=c:\book1.xls;','[Sheet1$]')
以前这个在2000上是好使的,现在2005上执行出现的错误是这样的:消息 15281,级别 16,状态 1,第 1 行
SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'Ad Hoc Distributed Queries'。有关启用 'Ad Hoc Distributed Queries' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。



用SA及WINDOW认证用户均不能删除,说是权限不够
执行:exec xp_cmdshell 'dir','*.exe'提示如下:

消息 15281,级别 16,状态 1,过程 xp_cmdshell,第 1 行
SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'xp_cmdshell'。有关启用 'xp_cmdshell' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。




在 SQL Server 2005 中,sp_dropextendedproc 不会删除系统扩展存储过程。但系统管理员应拒绝 public 角色对扩展存储过程的 EXECUTE 权限。在 SQL Server 2000 中,sp_dropextendedproc 可用于删除任何扩展存储过程。



SQL Server 2005 中引入的 xp_cmdshell 选项是服务器配置选项,使系统管理员能够控制是否可以在系统上执行 xp_cmdshell 扩展存储过程。默认情况下,xp_cmdshell 选项在新安装的软件上处于禁用状态,但是可以通过使用外围应用配置器工具或运行 sp_configure 系统存储过程来启用它,如下面的代码示例所示:

复制代码
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO
我的blog:http://szhaitao.blog.hexun.com & http://www.hoolee.com/user/haitao
--以上均为泛泛之谈--
不尽牛人滚滚来,无边硬伤纷纷现 人在江湖(出来的),哪能不挨刀(总归是要的)
网络对话,歧义纷生;你以为明白了对方的话,其实呢?

您所在的IP暂时不能使用低版本的QQ,请到:http://im.qq.com/下载安装最新版的QQ,感谢您对QQ的支持和使用

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录