如果是delphi的,我可以给你一个找局域网内所有SQL2000数据服务器的程序。
解决方案 »
- 该功能在sql job中如何实现
- select count(*) 与select count(1) 区别
- 如何在不同数据库间复制一个表?
- 关于数据库备份
- 提一个难以实现的问题!
- 求教:列中值为null时,如何替换为另外一列的数据?
- (狂送分100)在线等,大侠帮忙啊!!.NET链接数据库取不出数据的问题
- 从sqlserver2000读取大量数据,解析一个字段(字符串),分条存入2005
- 怪!怪!怪!到底是怎么回事?大家都来看看~~~~~~
- 请教高手:学用pb6和oracle8i作项目,应该先学pb还是oracle?
- ODBC出错了,请兄弟们帮忙。
- 各位大大快點幫忙﹗一個小問題﹗小弟在線等.........急...
set @sname=case when charindex('\',@@servername)=0 then @@servername
else left(@@servername,charindex('\',@@servername)-1) end--得到ip地址
create table #ip(a varchar(200))
set @sql='ping '+@sname+' -a -n 1 -l 1'
insert into #ip exec master..xp_cmdshell @sqlselect @ip=left(a,patindex('%:%',a)-1) from(
select a=substring(a,patindex('Ping statistics for %:%',a)+20,20)
from #ip where a like 'Ping statistics for %:%') a--显示结果
select 计算机名=@sname,ip地址=@ipgo
drop table #ip
想用Java做获取局域网内所有SQL服务器列表的功能,不知能否实现
http://expert.csdn.net/Expert/topic/2385/2385217.xml?temp=.9079553
create table #tspid(
spid int null,
ecid int null,
status varchar(200) null,
loginname varchar(200) null,
hostname varchar(200) null,
blk bit null,
dbname varchar(200) null,
cmd varchar(200)
)insert into #tspid(spid,ecid,status,loginname,hostname,blk,dbname,cmd) exec sp_who create table #userip(id int identity,hostname varchar(200),txt varchar(8000))declare @cmdStr varchar(100), @hostName varchar(30), @userip varchar(20), @sendstr varchar(100)declare tspid cursor for select hostname from #tspid where spid>50
open tspid fetch next from tspid into @hostname
WHILE @@FETCH_STATUS = 0
begin
create table #table (id int identity,txt varchar(8000))
select @cmdStr='ping '+@hostName
insert #table(txt) exec master..xp_cmdshell @cmdStr
insert #userip select @hostname,substring(txt,charindex('[',txt)+1,charindex(']',txt)-charindex('[',txt)-1) from #table where id=2
drop table #table
fetch next from tspid into @hostname
end select * from #userip
drop table #tspid ,#userip
endgo--调用:
exec send_message
是不能注册sqldmo.rll文件啊,如何能够打包安装呢?
是标准SQL语句?
他代表什么意思?