
how to store the results of ping into sql server
create table #mytable(output varchar(255))
insert #mytable
exec master..xp_cmdshell 'ping myremoteserver'
insert yourlogtable
select output from #mytable
where DATALENGTH(output)>1
and output not like 'pinging%'
-------------------------------------------
Alexander Tarasul
Microsoft Certified Solution Developer(SQL Server,VB)
Certified Borland Delphi Client Server Developer
http://pages.ripco.com/~shleym
SQL Answers located at
http://pages.ripco.com/~shleym/sql_answers.htm
---------------
Quote:
>I need a program monitor the network status--ping a server every a hour
>how do I reference the NT command line in SQL server and store the result
>and time of ping into a SQL database
>--
>-----------------------------
>Homepage: http://chedong.163.net
>ICQ UIN: 27294724