ping en sql?

23/09/2003 - 02:03 por elvis | Informe spam
como puedo saber si un servidor remoto esta en linea o no?

no quiero usar el addlinkserver , lo que estoy utilizando
es el opendatabase

tengo el user , tengo el password , y en nombre del
servidor , algo asi como el ping de windows pero en sql

Preguntas similare

Leer las respuestas

#1 Mauricio Sthandier R.
23/09/2003 - 03:22 | Informe spam
tu servidor remoto es SQL Server ?
de ser así puedes las herramientas osql o isql

si es otro tipo de servidor no sabría decirte

Fear
is temporary.
Pride
is forever.

"elvis" escribió en el mensaje
news:b60501c38166$22f9cf30$
Mostrar la cita
#2 Fernando España
23/09/2003 - 03:47 | Informe spam
/*


You can pass an additional parameter that indicates if @server is a linked
server. It
will then try and get the network name from sysservers. The parameter is
optional and
is either 'Y' or 'N' (or miss it out) e.g.

declare @up int

exec sp_serverup 'SRVLINK','Y',@up=@up OUTPUT

select @up

*/



CREATE PROCEDURE spu_IsServerUp
(
@server sysname,
@islinked char(1)='N',
@up int OUTPUT
)
AS
/*
1 = Running
-1 = Down
*/

SET NOCOUNT ON

DECLARE @hr int
DECLARE @sql int
DECLARE @cnt int ; SET @cnt = 0
DECLARE @server_resolved sysname
DECLARE @status int ; SET @status = 0

IF @islinked='Y'
BEGIN

SELECT @cnt=COUNT(*)
FROM master..sysservers
WHERE srvname=@server
AND isremote=1

IF @cnt<>1
BEGIN
RAISERROR('Linked server name cannot be resolved',16,1)
RETURN(1)
END

SELECT @server_resolved = datasource
FROM master..sysservers
WHERE srvname=@server
AND isremote=1

END


Fernando España

el 95% de las instrucciones que precisan de un
CURSOR se puede hacer sin ellos y mas
Eficientemente.--

BRIGADA AINTI-CURSORES
"elvis" wrote in message
news:b60501c38166$22f9cf30$
Mostrar la cita
#3 Gustavo Larriera [MVP]
23/09/2003 - 04:46 | Informe spam
odbcping /SMyServer /Usa /PsaPassWord

Gustavo Larriera, MSFT MVP-SQL
Uruguay LatAm

***IMPORTANTE*** Microsoft Security Bulletin MS03-039
http://www.microsoft.com/security/s...03-039.asp

This message is provided "AS IS" with no warranties expressed or implied,
and confers no rights.


"elvis" wrote in message
news:b60501c38166$22f9cf30$
Mostrar la cita
#4 Elvis
23/09/2003 - 16:55 | Informe spam
Si es, SQL Server. Te agradecería muchísimo tu valiosa
ayuda. Saludos.
Mostrar la cita
no?
Mostrar la cita
utilizando
Mostrar la cita
#5 Carlos Garcia Hermida
24/09/2003 - 17:14 | Informe spam
Disculpa, pero no encuentro la utilidad o comando, odbcping en la version
SQL 2000.

Gracias por adelantado.
Ads by Google
Search Busqueda sugerida