SQL Server 定时访问url激活数据同步示例
更新时间:2014年05月20日 08:46:36 作者:
这篇文章主要介绍的是SQL Server 定时访问url激活数据同步的具体实现,需要的朋友可以参考下
创建作业,执行以下命令
exec master..XP_cmdshell 'http://srm.rapoo.cn?op=sapintferace&i=1&t=1'
激活执行同步网步
以下内容来自网络,介绍如何启用 xp_cmdshell 扩展存储过程将命令
一、简介
xp_cmdshell 扩展存储过程将命令字符串作为操作系统命令 shell 执行,并以文本行的形式返回所有输出。
三、SQL Server 2005中的xp_cmdshell
由于存在安全隐患,所以在SQL Server 2005中, xp_cmdshell 默认是关闭的。
此时,如果执行 xp_cmdshell 将会提示服务未开启:
exec xp_cmdshell 'dir c:/'
消息 15281,级别 16,状态 1,过程 xp_cmdshell,第 1 行
SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'xp_cmdshell'。有关启用 'xp_cmdshell' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。
四、开启xp_cmdshell
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;
关闭一样.只是将上面的后面的那个"1"改成"0"就可以了.
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 0;RECONFIGURE;
未能找到存储过程 'master..xp_cmdshell'
第一步执行:EXEC sp_addextendedproc xp_cmdshell,@dllname ='xplog70.dll'declare @o int
第二步执行:sp_addextendedproc 'xp_cmdshell','xpsql70.dll'
exec master..XP_cmdshell 'http://srm.rapoo.cn?op=sapintferace&i=1&t=1'
激活执行同步网步
以下内容来自网络,介绍如何启用 xp_cmdshell 扩展存储过程将命令
一、简介
xp_cmdshell 扩展存储过程将命令字符串作为操作系统命令 shell 执行,并以文本行的形式返回所有输出。
三、SQL Server 2005中的xp_cmdshell
由于存在安全隐患,所以在SQL Server 2005中, xp_cmdshell 默认是关闭的。
此时,如果执行 xp_cmdshell 将会提示服务未开启:
exec xp_cmdshell 'dir c:/'
消息 15281,级别 16,状态 1,过程 xp_cmdshell,第 1 行
SQL Server 阻止了对组件 'xp_cmdshell' 的 过程'sys.xp_cmdshell' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'xp_cmdshell'。有关启用 'xp_cmdshell' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。
四、开启xp_cmdshell
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;
关闭一样.只是将上面的后面的那个"1"改成"0"就可以了.
EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 0;RECONFIGURE;
未能找到存储过程 'master..xp_cmdshell'
第一步执行:EXEC sp_addextendedproc xp_cmdshell,@dllname ='xplog70.dll'declare @o int
第二步执行:sp_addextendedproc 'xp_cmdshell','xpsql70.dll'
相关文章
强制SQL Server执行计划使用并行提升在复杂查询语句下的性能
最近在给一个客户做调优的时候发现一个很有意思的现象,对于一个复杂查询(涉及12个表)建立必要的索引后,语句使用的IO急剧下降,但执行时间不降反升,由原来的8秒升到20秒。2014-07-07SQL Server 2012使用Offset/Fetch Next实现分页数据查询
在Sql Server 2012之前,实现分页主要是使用ROW_NUMBER(),在SQL Server2012,可以使用Offset ...Rows Fetch Next ... Rows only的方式去实现分页数据查询,具体代码详解大家参考下本文2017-07-07
最新评论