Professional Web Applications Themes

function - Is Server up - Microsoft SQL / MS SQL Server

hi all, i would like to write a function which determines whether a given server is up and running. i can use xp_cmdshell with ping in a proc, directing output to a temp table, but alas not in a function. any ideas? doug...

  1. #1

    Default function - Is Server up


    hi all,

    i would like to write a function which determines whether
    a given server is up and running.

    i can use xp_cmdshell with ping in a proc, directing
    output to a temp table, but alas not in a function.

    any ideas?

    doug
    doug Guest

  2. #2

    Default function - Is Server up

    I would write a simple VB app using the ADO connection
    object to see if I could connect thus validating the
    existance of the running server or not.

    Mark Baekdal
    dbghost.com
    >-----Original Message-----
    >
    >hi all,
    >
    >i would like to write a function which determines whether
    >a given server is up and running.
    >
    >i can use xp_cmdshell with ping in a proc, directing
    >output to a temp table, but alas not in a function.
    >
    >any ideas?
    >
    >doug
    >.
    >
    mark baekdal Guest

  3. #3

    Default Re: function - Is Server up

    DOUG
    declare ip varchar(15)
    create table #doug(line VARCHAR(255))
    insert #doug exec master..xp_cmdshell 'ipconfig'
    delete #doug where charindex('IP Address', line)<=0
    delete #doug where line is null
    select top 1 ip = substring(line, charindex(':', line)+1, 255) from #doug
    print ip
    drop table #doug


    "doug" <doughollandhotmail.com> wrote in message
    news:009501c34244$bf7aeee0$a301280aphx.gbl...
    >
    > hi all,
    >
    > i would like to write a function which determines whether
    > a given server is up and running.
    >
    > i can use xp_cmdshell with ping in a proc, directing
    > output to a temp table, but alas not in a function.
    >
    > any ideas?
    >
    > doug

    Uri Dimant Guest

  4. #4

    Default Re: function - Is Server up


    Thank you both.

    Doug
    >-----Original Message-----
    >DOUG
    >declare ip varchar(15)
    >create table #doug(line VARCHAR(255))
    >insert #doug exec master..xp_cmdshell 'ipconfig'
    >delete #doug where charindex('IP Address', line)<=0
    >delete #doug where line is null
    >select top 1 ip = substring(line, charindex(':', line)
    +1, 255) from #doug
    >print ip
    >drop table #doug
    >
    >
    >"doug" <doughollandhotmail.com> wrote in message
    >news:009501c34244$bf7aeee0$a301280aphx.gbl...
    >>
    >> hi all,
    >>
    >> i would like to write a function which determines
    whether
    >> a given server is up and running.
    >>
    >> i can use xp_cmdshell with ping in a proc, directing
    >> output to a temp table, but alas not in a function.
    >>
    >> any ideas?
    >>
    >> doug
    >
    >
    >.
    >
    Doug Guest

Similar Threads

  1. How to add postback function in Custom Server Controls
    By ton in forum ASP.NET Building Controls
    Replies: 11
    Last Post: February 2nd, 07:55 PM
  2. mail function has FROM changed by server?
    By Oliver Spiesshofer in forum PHP Development
    Replies: 1
    Last Post: July 23rd, 09:39 PM
  3. Calling client function from server script
    By J. Marcelo Barbieri in forum ASP.NET General
    Replies: 1
    Last Post: July 10th, 06:07 AM
  4. connection variable in Function of SQL server
    By reader man in forum Microsoft SQL / MS SQL Server
    Replies: 1
    Last Post: July 3rd, 07:53 AM
  5. SHA function usage - sql server
    By Rao in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 1st, 08:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139