Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Location
    Mumbai,India
    Posts
    13

    Post Unanswered: Help needed regarding sp_serveroption

    Hi,

    In sp_serveroption there is an option of timeouts.
    Is there any way by which i can come to know that its set to True or False.
    I know how to set this value to True or False but i dont know how to check its current value.

    Can someone please help me with that?

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Having a look at the source code of sp_serveroption
    This should probably work for you
    Code:
    select v.name ServerOption
    from sysservers s, spt_values v
    where v.type='A'
      and s.srvstatus & v.number != 0
      and v.number>=0
      and s.srvname='<srvname>'

  3. #3
    Join Date
    Aug 2007
    Location
    Mumbai,India
    Posts
    13
    Hi,

    Thanks for the help, but the issue is still i cannot find out from this wether the value is set to True or False.

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    ok maybe this
    Code:
    select v.name ServerOption 
    ,case when s.srvstatus & v.number = v.number then 'True' else 'False' end
    from master..sysservers s, master..spt_values v
    where v.type='A'
      and v.number>0 
      and s.srvname='your_server_name'

  5. #5
    Join Date
    Aug 2007
    Location
    Mumbai,India
    Posts
    13
    Thanks alot,

    Thats exactly what i was looking for.

Posting Permissions

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