Thanks! Just what I needed. By the way, the correct tablename is:
"Roger Wolter[MSFT]" <rwolter@online.microsoft.com> wrote in message
news:%23bsLDGkaGHA.3720@TK2MSFTNGP03.phx.gbl...
> There's an event that you can monitor to be notified when the state
> changes.
>
> The sys.dm_database_mirroring view can be used to determine the mirroring
> state of all the databases of an instance. The
> sys.dm_database_mirroring_witnesses can be used from the witness to see
> which server is the primary.
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
>
http://www.microsoft.com/info/cpyright.htm >
> "Per Schjetne" <newsuser1@gdconsult.no> wrote in message
> news:OLn03SiaGHA.2368@TK2MSFTNGP03.phx.gbl...
>>I agree on that. Is there a way to query any system tables telling me
>>which database is acting as principal vs mirror? Is the witness aware of
>>this, or is it just monitoring which server is replying, being able to do
>>a failover?
>>
>>
>> "Roger Wolter[MSFT]" <rwolter@online.microsoft.com> wrote in message
>> news:%23J5%23JJhaGHA.1192@TK2MSFTNGP04.phx.gbl...
>>> If you think about it, failing back will cause all client connections to
>>> be dropped again so you probably don't want SQL Server to decide when is
>>> a good time to fail back. It's probably much better if you pick a time
>>> when the change won't affect too many users.
>>>
>>> --
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>> Use of included script samples are subject to the terms specified at
>>>
http://www.microsoft.com/info/cpyright.htm >>>
>>> "Per Schjetne" <newsuser1@gdconsult.no> wrote in message
>>> news:uo3Ac4caGHA.3736@TK2MSFTNGP04.phx.gbl...
>>>>I have been using Mirroring now for a while and put the system into
>>>>production now after applying SQL sp 1.
>>>>
>>>> We have a setup with a witness, principal and mirror with certificates
>>>> (the witness is on a webserver in a different domain, so we can't use
>>>> integrated security).
>>>>
>>>> Automatic failover works fine if we take down the principal. But when
>>>> the principal is up and running again, no automatic failback occur. If
>>>> this by design, or is there something I've missed out in the
>>>> configuration?
>>>>
>>>> Per Schjetne
>>>>
>>>
>>>
>>
>>
>
>