数据库中测试网络是否连通
create table #temp (mystr varchar(200))
declare @netok int
insert into #temp exec xp_cmdshell 'ping IP'
select @netok=count(*) from #temp where mystr like 'Request timed out%'
if @netok>2
print '网络不通'
else
print '网络OK'
drop table #temp
提示:能找到存储过程 'xp_cmdshell'。
怎么解决