Friday, March 30, 2012

Mirroring for certain tables from the database in sql 2005

Can I know is it possible using database mirroring for only certain tables from the database, not for the whole database in sql server 2005. Hopefully able to get any assistance here. Thx alot.

Best Regards,

Hans

Mirroring is at the database level (not the instance level, not the table level)

|||oic. thanks for the information. :)|||

Hi Jerry, sorry for bothering you again. Can I ask some questions regarding the connection for the database mirroring. Actually I did post a thread here and hope can get any assistance from you. If can, I prefer to share/discuss the problem for solving this scenario which is the Error 1418 through messenger. Hope to hear from you soon. Thanx a lot and have a nice day, Jerry.

Best Regards,

Hans

Mirroring for certain tables from the database in sql 2005

Can I know is it possible using database mirroring for only certain tables from the database, not for the whole database in sql server 2005. Hopefully able to get any assistance here. Thx alot.

Best Regards,

Hans

Mirroring is at the database level (not the instance level, not the table level)

|||oic. thanks for the information. :)|||

Hi Jerry, sorry for bothering you again. Can I ask some questions regarding the connection for the database mirroring. Actually I did post a thread here and hope can get any assistance from you. If can, I prefer to share/discuss the problem for solving this scenario which is the Error 1418 through messenger. Hope to hear from you soon. Thanx a lot and have a nice day, Jerry.

Best Regards,

Hans

sql

Mirroring Failover/Failback

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 SchjetneThe roles for mirroring are soft roles. So, you cannot define a preferred no
de (like you can for a
cluster). If you want to fail back, you have to ask for it (ALTER DATABASE).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"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 product
ion now after applying
>SQL sp 1.
> We have a setup with a witness, principal and mirror with certificates (th
e 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
>|||"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?
Sorry, there isn't an option for automatic failback. You will have to do
that manually.
Russ Kaufmann
MVP - Windows Server - Clustering
ClusterHelp.com, a Microsoft Certified Gold Partner
Web http://www.clusterhelp.com
Blog http://msmvps.com/clusterhelp|||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
>|||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...
>|||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...
>|||That's not exactly correct.
The reason it did not failback, is because that database is no longer the
principal. Failover causes a role reversal. When it fails over to the
mirror, that database is promoted to a principal and begins serving the
database. When the other database comes online, its role is automatically
demoted to mirror and the transactions start flowing back to it.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eDV9lIeaGHA.4936@.TK2MSFTNGP05.phx.gbl...
> The roles for mirroring are soft roles. So, you cannot define a preferred
> node (like you can for a cluster). If you want to fail back, you have to
> ask for it (ALTER DATABASE).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Per Schjetne" <newsuser1@.gdconsult.no> wrote in message
> news:uo3Ac4caGHA.3736@.TK2MSFTNGP04.phx.gbl...
>|||Thanks! Just what I needed. By the way, the correct tablename is:
sys.database_mirroring_witnesses
Per :-)
"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...
>

Mirroring Failover/Failback

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 SchjetneThe roles for mirroring are soft roles. So, you cannot define a preferred node (like you can for a
cluster). If you want to fail back, you have to ask for it (ALTER DATABASE).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"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
>|||"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?
Sorry, there isn't an option for automatic failback. You will have to do
that manually.
--
Russ Kaufmann
MVP - Windows Server - Clustering
ClusterHelp.com, a Microsoft Certified Gold Partner
Web http://www.clusterhelp.com
Blog http://msmvps.com/clusterhelp|||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
>|||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
>|||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
>>
>|||That's not exactly correct.
The reason it did not failback, is because that database is no longer the
principal. Failover causes a role reversal. When it fails over to the
mirror, that database is promoted to a principal and begins serving the
database. When the other database comes online, its role is automatically
demoted to mirror and the transactions start flowing back to it.
--
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eDV9lIeaGHA.4936@.TK2MSFTNGP05.phx.gbl...
> The roles for mirroring are soft roles. So, you cannot define a preferred
> node (like you can for a cluster). If you want to fail back, you have to
> ask for it (ALTER DATABASE).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "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
>|||Thanks! Just what I needed. By the way, the correct tablename is:
sys.database_mirroring_witnesses
Per :-)
"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
>>
>>
>

Mirroring Failover leaves 2 databases as Principal

We have seven databases mirrrored on our production server. Two of
these failed over, one correctly. The other database is marked as
"Principal/Disconnected" on BOTH the primary and secondary servers. I
can browse the tables in each database. Obviously this is not meant to
happen - one of the databases should be in Restoring mode.Transactions
are only going into the one database - on the Primary server. Has
anyone come across this before? Any ideas on how to proceed?
If I attempt to pause mirroring on the primary server it fails with
the message "The database mirror is busy, re-issue the command later".
I can see this getting really bad if I am unable to (at worst) remove
mirroring from either database due to them thinking that they are the
principal and cannot connect to the other mirrored database.
(both servers on SP2.)On Sep 19, 7:03 pm, Calculated <sarahjco...@.gmail.com> wrote:
> We have seven databases mirrrored on our production server. Two of
> these failed over, one correctly. The other database is marked as
> "Principal/Disconnected" on BOTH the primary and secondary servers. I
> can browse the tables in each database. Obviously this is not meant to
> happen - one of the databases should be in Restoring mode.Transactions
> are only going into the one database - on the Primary server. Has
> anyone come across this before? Any ideas on how to proceed?
> If I attempt to pause mirroring on the primary server it fails with
> the message "The database mirror is busy, re-issue the command later".
> I can see this getting really bad if I am unable to (at worst) remove
> mirroring from either database due to them thinking that they are the
> principal and cannot connect to the other mirrored database.
> (both servers on SP2.)
My plan was to come in and backup both databases and then restart the
SQL Service on the secondary, hoping that the state would change.
However when I got in to check this (maybe 6 hours later), the
database on the Secondary had elevated itself to be the Principal
(connected) and the Primay server's database was Synchronised/
Restoring. Good. I have since manually failed the databases back over
to primary. All seems ok so far but I will need to check this
throughout the day. (Hope no-one else runs into this!)

Mirroring Failover - Have to run sp_change_users_login

I have mirroring configured (with a witness server) on a database that is
being used by an ASP.NET application. The app uses SQL Authentication, and
the conneciton string includes the Failover Partner statement.
Whenever the database fails over, the app throws the following error: Cannot
open database 'mydb' requested by the login. The login failed. Login failed
for user 'myuser'.
Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
the problem, but only until I fail back over the the primary database, then
I
have to run the script again. Every time I fail over (in either direction),
the sp_change_users_login needs to be run again before apps connection using
SQL Authentication will work.
Auto failover with mirroring, isn't really auto failover if I have to run
this script every time.
1) Is there a way to insert a custom script into the autofailover process?
2) Do I need to convert all applications using this db to use Windows Auth
only?
3) Are there any other solutions to this problem?Drop the [SQL] logins on your mirror.
When you run the CREATE LOGIN script on that server to create the logins,
make sure that you specify the SID of that particular user that is within
the primary server.
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>I have mirroring configured (with a witness server) on a database that is
> being used by an ASP.NET application. The app uses SQL Authentication, and
> the conneciton string includes the Failover Partner statement.
> Whenever the database fails over, the app throws the following error:
> Cannot
> open database 'mydb' requested by the login. The login failed. Login
> failed
> for user 'myuser'.
> Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> the problem, but only until I fail back over the the primary database,
> then I
> have to run the script again. Every time I fail over (in either
> direction),
> the sp_change_users_login needs to be run again before apps connection
> using
> SQL Authentication will work.
> Auto failover with mirroring, isn't really auto failover if I have to run
> this script every time.
> 1) Is there a way to insert a custom script into the autofailover process?
> 2) Do I need to convert all applications using this db to use Windows Auth
> only?
> 3) Are there any other solutions to this problem?
>|||How do I get the SIDs for logins on the primary?
"Keith Kratochvil" wrote:

> Drop the [SQL] logins on your mirror.
> When you run the CREATE LOGIN script on that server to create the logins,
> make sure that you specify the SID of that particular user that is within
> the primary server.
>
> --
> Keith Kratochvil
>
> "Dan" <Dan@.discussions.microsoft.com> wrote in message
> news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>
>|||select name, sid from master..syslogins
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:82944D2B-DD3F-44F7-A7D7-495C446474B6@.microsoft.com...[vbcol=seagreen]
> How do I get the SIDs for logins on the primary?
> "Keith Kratochvil" wrote:
>|||Google for sp_help_revlogin. Run this periodically on the source server so y
ou have a script
containing the proper SID for each login.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>I have mirroring configured (with a witness server) on a database that is
> being used by an ASP.NET application. The app uses SQL Authentication, and
> the conneciton string includes the Failover Partner statement.
> Whenever the database fails over, the app throws the following error: Cann
ot
> open database 'mydb' requested by the login. The login failed. Login faile
d
> for user 'myuser'.
> Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> the problem, but only until I fail back over the the primary database, the
n I
> have to run the script again. Every time I fail over (in either direction)
,
> the sp_change_users_login needs to be run again before apps connection usi
ng
> SQL Authentication will work.
> Auto failover with mirroring, isn't really auto failover if I have to run
> this script every time.
> 1) Is there a way to insert a custom script into the autofailover process?
> 2) Do I need to convert all applications using this db to use Windows Auth
> only?
> 3) Are there any other solutions to this problem?
>

Mirroring Failover - Have to run sp_change_users_login

I have mirroring configured (with a witness server) on a database that is
being used by an ASP.NET application. The app uses SQL Authentication, and
the conneciton string includes the Failover Partner statement.
Whenever the database fails over, the app throws the following error: Cannot
open database 'mydb' requested by the login. The login failed. Login failed
for user 'myuser'.
Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
the problem, but only until I fail back over the the primary database, then I
have to run the script again. Every time I fail over (in either direction),
the sp_change_users_login needs to be run again before apps connection using
SQL Authentication will work.
Auto failover with mirroring, isn't really auto failover if I have to run
this script every time.
1) Is there a way to insert a custom script into the autofailover process?
2) Do I need to convert all applications using this db to use Windows Auth
only?
3) Are there any other solutions to this problem?
Drop the [SQL] logins on your mirror.
When you run the CREATE LOGIN script on that server to create the logins,
make sure that you specify the SID of that particular user that is within
the primary server.
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>I have mirroring configured (with a witness server) on a database that is
> being used by an ASP.NET application. The app uses SQL Authentication, and
> the conneciton string includes the Failover Partner statement.
> Whenever the database fails over, the app throws the following error:
> Cannot
> open database 'mydb' requested by the login. The login failed. Login
> failed
> for user 'myuser'.
> Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> the problem, but only until I fail back over the the primary database,
> then I
> have to run the script again. Every time I fail over (in either
> direction),
> the sp_change_users_login needs to be run again before apps connection
> using
> SQL Authentication will work.
> Auto failover with mirroring, isn't really auto failover if I have to run
> this script every time.
> 1) Is there a way to insert a custom script into the autofailover process?
> 2) Do I need to convert all applications using this db to use Windows Auth
> only?
> 3) Are there any other solutions to this problem?
>
|||How do I get the SIDs for logins on the primary?
"Keith Kratochvil" wrote:

> Drop the [SQL] logins on your mirror.
> When you run the CREATE LOGIN script on that server to create the logins,
> make sure that you specify the SID of that particular user that is within
> the primary server.
>
> --
> Keith Kratochvil
>
> "Dan" <Dan@.discussions.microsoft.com> wrote in message
> news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>
>
|||select name, sid from master..syslogins
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:82944D2B-DD3F-44F7-A7D7-495C446474B6@.microsoft.com...[vbcol=seagreen]
> How do I get the SIDs for logins on the primary?
> "Keith Kratochvil" wrote:
|||Google for sp_help_revlogin. Run this periodically on the source server so you have a script
containing the proper SID for each login.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>I have mirroring configured (with a witness server) on a database that is
> being used by an ASP.NET application. The app uses SQL Authentication, and
> the conneciton string includes the Failover Partner statement.
> Whenever the database fails over, the app throws the following error: Cannot
> open database 'mydb' requested by the login. The login failed. Login failed
> for user 'myuser'.
> Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> the problem, but only until I fail back over the the primary database, then I
> have to run the script again. Every time I fail over (in either direction),
> the sp_change_users_login needs to be run again before apps connection using
> SQL Authentication will work.
> Auto failover with mirroring, isn't really auto failover if I have to run
> this script every time.
> 1) Is there a way to insert a custom script into the autofailover process?
> 2) Do I need to convert all applications using this db to use Windows Auth
> only?
> 3) Are there any other solutions to this problem?
>
sql

Mirroring Failover - Have to run sp_change_users_login

I have mirroring configured (with a witness server) on a database that is
being used by an ASP.NET application. The app uses SQL Authentication, and
the conneciton string includes the Failover Partner statement.
Whenever the database fails over, the app throws the following error: Cannot
open database 'mydb' requested by the login. The login failed. Login failed
for user 'myuser'.
Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
the problem, but only until I fail back over the the primary database, then I
have to run the script again. Every time I fail over (in either direction),
the sp_change_users_login needs to be run again before apps connection using
SQL Authentication will work.
Auto failover with mirroring, isn't really auto failover if I have to run
this script every time.
1) Is there a way to insert a custom script into the autofailover process?
2) Do I need to convert all applications using this db to use Windows Auth
only?
3) Are there any other solutions to this problem?... the first one gave me an error. I didn't think it had gone through.|||... the first one gave me an error. I didn't think it had gone through.|||Drop the [SQL] logins on your mirror.
When you run the CREATE LOGIN script on that server to create the logins,
make sure that you specify the SID of that particular user that is within
the primary server.
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>I have mirroring configured (with a witness server) on a database that is
> being used by an ASP.NET application. The app uses SQL Authentication, and
> the conneciton string includes the Failover Partner statement.
> Whenever the database fails over, the app throws the following error:
> Cannot
> open database 'mydb' requested by the login. The login failed. Login
> failed
> for user 'myuser'.
> Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> the problem, but only until I fail back over the the primary database,
> then I
> have to run the script again. Every time I fail over (in either
> direction),
> the sp_change_users_login needs to be run again before apps connection
> using
> SQL Authentication will work.
> Auto failover with mirroring, isn't really auto failover if I have to run
> this script every time.
> 1) Is there a way to insert a custom script into the autofailover process?
> 2) Do I need to convert all applications using this db to use Windows Auth
> only?
> 3) Are there any other solutions to this problem?
>|||How do I get the SIDs for logins on the primary?
"Keith Kratochvil" wrote:
> Drop the [SQL] logins on your mirror.
> When you run the CREATE LOGIN script on that server to create the logins,
> make sure that you specify the SID of that particular user that is within
> the primary server.
>
> --
> Keith Kratochvil
>
> "Dan" <Dan@.discussions.microsoft.com> wrote in message
> news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
> >I have mirroring configured (with a witness server) on a database that is
> > being used by an ASP.NET application. The app uses SQL Authentication, and
> > the conneciton string includes the Failover Partner statement.
> >
> > Whenever the database fails over, the app throws the following error:
> > Cannot
> > open database 'mydb' requested by the login. The login failed. Login
> > failed
> > for user 'myuser'.
> >
> > Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> > the problem, but only until I fail back over the the primary database,
> > then I
> > have to run the script again. Every time I fail over (in either
> > direction),
> > the sp_change_users_login needs to be run again before apps connection
> > using
> > SQL Authentication will work.
> >
> > Auto failover with mirroring, isn't really auto failover if I have to run
> > this script every time.
> >
> > 1) Is there a way to insert a custom script into the autofailover process?
> >
> > 2) Do I need to convert all applications using this db to use Windows Auth
> > only?
> >
> > 3) Are there any other solutions to this problem?
> >
>
>|||select name, sid from master..syslogins
--
Keith Kratochvil
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:82944D2B-DD3F-44F7-A7D7-495C446474B6@.microsoft.com...
> How do I get the SIDs for logins on the primary?
> "Keith Kratochvil" wrote:
>> Drop the [SQL] logins on your mirror.
>> When you run the CREATE LOGIN script on that server to create the logins,
>> make sure that you specify the SID of that particular user that is within
>> the primary server.
>>
>> --
>> Keith Kratochvil
>>
>> "Dan" <Dan@.discussions.microsoft.com> wrote in message
>> news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>> >I have mirroring configured (with a witness server) on a database that
>> >is
>> > being used by an ASP.NET application. The app uses SQL Authentication,
>> > and
>> > the conneciton string includes the Failover Partner statement.
>> >
>> > Whenever the database fails over, the app throws the following error:
>> > Cannot
>> > open database 'mydb' requested by the login. The login failed. Login
>> > failed
>> > for user 'myuser'.
>> >
>> > Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser'
>> > fixes
>> > the problem, but only until I fail back over the the primary database,
>> > then I
>> > have to run the script again. Every time I fail over (in either
>> > direction),
>> > the sp_change_users_login needs to be run again before apps connection
>> > using
>> > SQL Authentication will work.
>> >
>> > Auto failover with mirroring, isn't really auto failover if I have to
>> > run
>> > this script every time.
>> >
>> > 1) Is there a way to insert a custom script into the autofailover
>> > process?
>> >
>> > 2) Do I need to convert all applications using this db to use Windows
>> > Auth
>> > only?
>> >
>> > 3) Are there any other solutions to this problem?
>> >
>>|||Google for sp_help_revlogin. Run this periodically on the source server so you have a script
containing the proper SID for each login.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Dan" <Dan@.discussions.microsoft.com> wrote in message
news:0BD0F8B7-A517-4707-B321-3D48F2B77EFF@.microsoft.com...
>I have mirroring configured (with a witness server) on a database that is
> being used by an ASP.NET application. The app uses SQL Authentication, and
> the conneciton string includes the Failover Partner statement.
> Whenever the database fails over, the app throws the following error: Cannot
> open database 'mydb' requested by the login. The login failed. Login failed
> for user 'myuser'.
> Running EXEC sp_change_users_login 'Update_One', 'myuser', 'myuser' fixes
> the problem, but only until I fail back over the the primary database, then I
> have to run the script again. Every time I fail over (in either direction),
> the sp_change_users_login needs to be run again before apps connection using
> SQL Authentication will work.
> Auto failover with mirroring, isn't really auto failover if I have to run
> this script every time.
> 1) Is there a way to insert a custom script into the autofailover process?
> 2) Do I need to convert all applications using this db to use Windows Auth
> only?
> 3) Are there any other solutions to this problem?
>

Mirroring error filling up event log

Hi,
I'm getting this error in the application event log roughly every second:
Database Mirroring login attempt failed with error: 'Connection handshake
failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt failed).
This is in the event log of the primary mirror sever. The setup is 2
identical sql servers (SP1), in the same domain, using the same domain
account for all services. I've confirmed the sql service accounts are local
admins on both boxes. So I'm not sure what 'login attempt' is failing. Can
anyone shed some light on this?
Thanks in advance.
Any help here Microsoft?
"sqlboy2000" wrote:

> Hi,
> I'm getting this error in the application event log roughly every second:
> Database Mirroring login attempt failed with error: 'Connection handshake
> failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt failed).
> This is in the event log of the primary mirror sever. The setup is 2
> identical sql servers (SP1), in the same domain, using the same domain
> account for all services. I've confirmed the sql service accounts are local
> admins on both boxes. So I'm not sure what 'login attempt' is failing. Can
> anyone shed some light on this?
> Thanks in advance.
|||SQL Server Database Mirroring uses SQL Server Service Broker (SSB) under the
covers, and this message is logged by SSB as a result of an attempt to
connect by a mirroring session. You should either set up security correctly
or disable the mirroring session from the mentioned host (the IP is in the
error log, but apparently the IP was truncated in your post).
Please refer to http://msdn2.microsoft.com/en-us/library/ms179306.aspx; see
the Setting Up Database Mirroring topic.
Don Vilen
This posting is provided "AS IS" with no warranties, and confers no rights
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:D7781F35-88F5-4D87-836D-0FC37D6ECC4C@.microsoft.com...[vbcol=seagreen]
> Any help here Microsoft?
> "sqlboy2000" wrote:
|||Security was setup correctly, this post wasn't accurate.
I'm going to post the actual problem now that I understand what's happening.
"Don Vilen [MSFT]" wrote:

> SQL Server Database Mirroring uses SQL Server Service Broker (SSB) under the
> covers, and this message is logged by SSB as a result of an attempt to
> connect by a mirroring session. You should either set up security correctly
> or disable the mirroring session from the mentioned host (the IP is in the
> error log, but apparently the IP was truncated in your post).
> Please refer to http://msdn2.microsoft.com/en-us/library/ms179306.aspx; see
> the Setting Up Database Mirroring topic.
> --
> Don Vilen
> This posting is provided "AS IS" with no warranties, and confers no rights
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:D7781F35-88F5-4D87-836D-0FC37D6ECC4C@.microsoft.com...
>

Mirroring error filling up event log

Hi,
I'm getting this error in the application event log roughly every second:
Database Mirroring login attempt failed with error: 'Connection handshake
failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt failed).
This is in the event log of the primary mirror sever. The setup is 2
identical sql servers (SP1), in the same domain, using the same domain
account for all services. I've confirmed the sql service accounts are local
admins on both boxes. So I'm not sure what 'login attempt' is failing. Can
anyone shed some light on this?
Thanks in advance.Any help here Microsoft?
"sqlboy2000" wrote:
> Hi,
> I'm getting this error in the application event log roughly every second:
> Database Mirroring login attempt failed with error: 'Connection handshake
> failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt failed).
> This is in the event log of the primary mirror sever. The setup is 2
> identical sql servers (SP1), in the same domain, using the same domain
> account for all services. I've confirmed the sql service accounts are local
> admins on both boxes. So I'm not sure what 'login attempt' is failing. Can
> anyone shed some light on this?
> Thanks in advance.|||SQL Server Database Mirroring uses SQL Server Service Broker (SSB) under the
covers, and this message is logged by SSB as a result of an attempt to
connect by a mirroring session. You should either set up security correctly
or disable the mirroring session from the mentioned host (the IP is in the
error log, but apparently the IP was truncated in your post).
Please refer to http://msdn2.microsoft.com/en-us/library/ms179306.aspx; see
the Setting Up Database Mirroring topic.
--
Don Vilen
This posting is provided "AS IS" with no warranties, and confers no rights
"sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
news:D7781F35-88F5-4D87-836D-0FC37D6ECC4C@.microsoft.com...
> Any help here Microsoft?
> "sqlboy2000" wrote:
>> Hi,
>> I'm getting this error in the application event log roughly every second:
>> Database Mirroring login attempt failed with error: 'Connection handshake
>> failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt
>> failed).
>> This is in the event log of the primary mirror sever. The setup is 2
>> identical sql servers (SP1), in the same domain, using the same domain
>> account for all services. I've confirmed the sql service accounts are
>> local
>> admins on both boxes. So I'm not sure what 'login attempt' is failing.
>> Can
>> anyone shed some light on this?
>> Thanks in advance.|||Security was setup correctly, this post wasn't accurate.
I'm going to post the actual problem now that I understand what's happening.
"Don Vilen [MSFT]" wrote:
> SQL Server Database Mirroring uses SQL Server Service Broker (SSB) under the
> covers, and this message is logged by SSB as a result of an attempt to
> connect by a mirroring session. You should either set up security correctly
> or disable the mirroring session from the mentioned host (the IP is in the
> error log, but apparently the IP was truncated in your post).
> Please refer to http://msdn2.microsoft.com/en-us/library/ms179306.aspx; see
> the Setting Up Database Mirroring topic.
> --
> Don Vilen
> This posting is provided "AS IS" with no warranties, and confers no rights
> "sqlboy2000" <sqlboy2000@.discussions.microsoft.com> wrote in message
> news:D7781F35-88F5-4D87-836D-0FC37D6ECC4C@.microsoft.com...
> > Any help here Microsoft?
> >
> > "sqlboy2000" wrote:
> >
> >> Hi,
> >> I'm getting this error in the application event log roughly every second:
> >>
> >> Database Mirroring login attempt failed with error: 'Connection handshake
> >> failed. An OS call failed: (8009030c) 0x8009030c(The logon attempt
> >> failed).
> >>
> >> This is in the event log of the primary mirror sever. The setup is 2
> >> identical sql servers (SP1), in the same domain, using the same domain
> >> account for all services. I've confirmed the sql service accounts are
> >> local
> >> admins on both boxes. So I'm not sure what 'login attempt' is failing.
> >> Can
> >> anyone shed some light on this?
> >>
> >> Thanks in advance.
>

Mirroring different versions

I am looking into Mirroring versus Replication. When going over the SQL2005
version features it list Mirroring (Safety Full Only). Does this mean the
database has to be in Full Recovery mode or that the mirror has to be
synchronous?
Thanks,
It means yes to both. With other editions of SQL Server 2005 (ie Enterprise
Edition) you have other options for mirroring, ie High Performance.
http://www.zetainteractive.com - Shift Happens!
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Cindy" <Cindy@.discussions.microsoft.com> wrote in message
news:9CC6F9E4-41F0-4F7F-AC52-09E74ED88B9A@.microsoft.com...
>I am looking into Mirroring versus Replication. When going over the
>SQL2005
> version features it list Mirroring (Safety Full Only). Does this mean the
> database has to be in Full Recovery mode or that the mirror has to be
> synchronous?
> Thanks,

Mirroring dedicated traffic

We are using the following configuration:

2 stand alone Windows 2003 servers 64 bit.

Each have two Gig Network cards configured with different IP addresses.

Each running multiple instances of SQL Server 64.

I am trying to set up a mirror where mirroring traffic between servers will be dedicated to a secondary IP address on the second NIC.

I am also trying to avoid Windows authentication.

Interesting enough: Security Configuration screen suggesting you to use fully qualified TCP addresses and, at the same time, does not give you such an option...

Would someone please point me in the right direction?

Thank you.

Use certificate authentication. Look up "database mirroring [SQL Server], certificates" in Books Online.|||

Thank you very much for your response.

That is definetely a lot of information.

As about "database mirroring, certificates" - there is no such a topic in BOL. There is a "Setting Up database mirroring using certificates (Transact SQL)". That is a great topic! However, I thought that my question was specific? Sorry if not. I asked about dedicating NIC No.2 to a traffic generated by mirroring process. Unfortunately, topic mentioned by you does not have anything about TCP/IP; adding port numbers and/or netowrk cards to the mirror. (Actually, it is roughly covering even the main topic since witness installation totally skipped).

And if we will go here: http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirfaq.mspx and go down to the networking section we will read a great article:

Q.

How do I specify a specific network adapter/network just for mirroring?

A.

Use multiple network adapters in the server. For the network adapter that you want to dedicate to mirroring, associate a specific IP address to that adapter. Then, associate a particular name to that IP address. Use that particular name when you set up database mirroring.

I can' believe that nobody didn't get to the point where he will have several NICs on the server? Is it such an exclusive installation?

|||

Thank you for all your help.

Resolved.

|||Is another way to do this just to change the hosts file on the Servers to point to the other network address as opposed changing the name?|||

You can simply bind the mirroring endpoint to listen only on the dedicated NIC's IP. This will apply to outgoing traffic as well as incomming.

alter endpoint [endpointname] as TCP (listener_ip = (<4 part ip of dedicated NIC>));

|||

Mark,

simple 'on surface' type of decision is not always a correct one. What is the sense in certificate based security and ecryption if you are exposing your DB network structure ? Wouldn't it be a security risk?

|||

Sorry, Remus.

I marked your response as an answer. It is incorrect though. (I am novice here and do not know how to reverse it).

There is one endpoint per instance. Then all traffic: 1. Database requests from a client application and 2. mirroring traffic are going through the same endpoint. As such altering endpoint will redirect all the traffic. Question was; how to separate the mirroring traffic through a separate NIC?

And solution is:

ALTER DATABASE [DB] SET PARTNER = 'TCP://<4part.IP.address>:<port_number>'

repeating this statement on both partners (principle and mirror) and then submitting

ALTER DATABASE SET [DB] WITNESS= 'TCP://<4part.IP.address>:<port_number>'

on principle or on mirror.

|||

I though you want to separate mirroring traffic from user connections traffic (TDS). Separting witness traffic from partner traffic is somehow unusual considering that connectivity with the witness is just as important as connectivity with the partner, otherwise why have a witness in the first place?

HTH,
~ Remus

|||

Glen Sidelnikov wrote:

There is one endpoint per instance. Then all traffic: 1. Database requests from a client application and 2. mirroring traffic are going through the same endpoint. As such altering endpoint will redirect all the traffic.

There are many enpoints in an instance: user connection endpoints (shared memory, named pipes, TCP), mirroring endpoint, service broker endpoint, HTTP enpoints. The settings for mirroring endpoint and user endpoints are distinct, therefore you can set the user endpoints (TDS listenning port) on one NIC and the mirroring endpoint on another NIC.

Another way to achieve this is to listen on all NICs, but rely on underlying IP to choose the appropiate NIC. That is, set the partner/witness names to a name that is only reachable through the desired NIC.

HTH,
~ Remus

sql

Mirroring dedicated traffic

We are using the following configuration:

2 stand alone Windows 2003 servers 64 bit.

Each have two Gig Network cards configured with different IP addresses.

Each running multiple instances of SQL Server 64.

I am trying to set up a mirror where mirroring traffic between servers will be dedicated to a secondary IP address on the second NIC.

I am also trying to avoid Windows authentication.

Interesting enough: Security Configuration screen suggesting you to use fully qualified TCP addresses and, at the same time, does not give you such an option...

Would someone please point me in the right direction?

Thank you.

Use certificate authentication. Look up "database mirroring [SQL Server], certificates" in Books Online.|||

Thank you very much for your response.

That is definetely a lot of information.

As about "database mirroring, certificates" - there is no such a topic in BOL. There is a "Setting Up database mirroring using certificates (Transact SQL)". That is a great topic! However, I thought that my question was specific? Sorry if not. I asked about dedicating NIC No.2 to a traffic generated by mirroring process. Unfortunately, topic mentioned by you does not have anything about TCP/IP; adding port numbers and/or netowrk cards to the mirror. (Actually, it is roughly covering even the main topic since witness installation totally skipped).

And if we will go here: http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirfaq.mspx and go down to the networking section we will read a great article:

Q.

How do I specify a specific network adapter/network just for mirroring?

A.

Use multiple network adapters in the server. For the network adapter that you want to dedicate to mirroring, associate a specific IP address to that adapter. Then, associate a particular name to that IP address. Use that particular name when you set up database mirroring.

I can' believe that nobody didn't get to the point where he will have several NICs on the server? Is it such an exclusive installation?

|||

Thank you for all your help.

Resolved.

|||Is another way to do this just to change the hosts file on the Servers to point to the other network address as opposed changing the name?|||

You can simply bind the mirroring endpoint to listen only on the dedicated NIC's IP. This will apply to outgoing traffic as well as incomming.

alter endpoint [endpointname] as TCP (listener_ip = (<4 part ip of dedicated NIC>));

|||

Mark,

simple 'on surface' type of decision is not always a correct one. What is the sense in certificate based security and ecryption if you are exposing your DB network structure ? Wouldn't it be a security risk?

|||

Sorry, Remus.

I marked your response as an answer. It is incorrect though. (I am novice here and do not know how to reverse it).

There is one endpoint per instance. Then all traffic: 1. Database requests from a client application and 2. mirroring traffic are going through the same endpoint. As such altering endpoint will redirect all the traffic. Question was; how to separate the mirroring traffic through a separate NIC?

And solution is:

ALTER DATABASE [DB] SET PARTNER = 'TCP://<4part.IP.address>:<port_number>'

repeating this statement on both partners (principle and mirror) and then submitting

ALTER DATABASE SET [DB] WITNESS= 'TCP://<4part.IP.address>:<port_number>'

on principle or on mirror.

|||

I though you want to separate mirroring traffic from user connections traffic (TDS). Separting witness traffic from partner traffic is somehow unusual considering that connectivity with the witness is just as important as connectivity with the partner, otherwise why have a witness in the first place?

HTH,
~ Remus

|||

Glen Sidelnikov wrote:

There is one endpoint per instance. Then all traffic: 1. Database requests from a client application and 2. mirroring traffic are going through the same endpoint. As such altering endpoint will redirect all the traffic.

There are many enpoints in an instance: user connection endpoints (shared memory, named pipes, TCP), mirroring endpoint, service broker endpoint, HTTP enpoints. The settings for mirroring endpoint and user endpoints are distinct, therefore you can set the user endpoints (TDS listenning port) on one NIC and the mirroring endpoint on another NIC.

Another way to achieve this is to listen on all NICs, but rely on underlying IP to choose the appropiate NIC. That is, set the partner/witness names to a name that is only reachable through the desired NIC.

HTH,
~ Remus

mirroring db: communication problem

Hi All
I am trying to test db mirroring. I went exactly as book says: started 2 sql
servers with the same domain accounts, created endpoints. Checked if
endpoints exist and listen - they do.
Than I try to alter test db:
ALTER DATABASE test
SET PARTNER =
'TCP://pc500:5000'
and get:
Msg 1418, Level 16, State 1, Line 2
The server network address "TCP://pc500:5000" can not be reached or does not
exist. Check the network address name and that the ports for the local and
remote endpoints are operational.
pc500 is a partner pc.
I also tried to use full domain name and ip addres. Each time I removed
endpoints and checked from os prompt if anything listens on the port - no.
But no matter what I do, I get this error. I also checked with my sysadmin
if there is any kind of filtering or firewalls - no.
As a matter of fact, pc500 is virtual pc which resides on my pc.
It does not work. I tried replication from 2005 to 2005 - the same problem.
But replication from 2k to 2005 - works painlessly.
Does anybody have clue what's the problem here?
Hello,
I supposed you can ping that server, right? :-)
Is the endpoint started? When it is created the default is stopped. Check
state_desc on
select * from sys.database_mirroring_endpoints
Always use full domain name.
Check port is correct on sys.tcp_endpoints.
Hope this helps,
Ben Nevarez
"Gene." wrote:

> Hi All
> I am trying to test db mirroring. I went exactly as book says: started 2 sql
> servers with the same domain accounts, created endpoints. Checked if
> endpoints exist and listen - they do.
> Than I try to alter test db:
> ALTER DATABASE test
> SET PARTNER =
> 'TCP://pc500:5000'
> and get:
> Msg 1418, Level 16, State 1, Line 2
> The server network address "TCP://pc500:5000" can not be reached or does not
> exist. Check the network address name and that the ports for the local and
> remote endpoints are operational.
> pc500 is a partner pc.
> I also tried to use full domain name and ip addres. Each time I removed
> endpoints and checked from os prompt if anything listens on the port - no.
> But no matter what I do, I get this error. I also checked with my sysadmin
> if there is any kind of filtering or firewalls - no.
> As a matter of fact, pc500 is virtual pc which resides on my pc.
> It does not work. I tried replication from 2005 to 2005 - the same problem.
> But replication from 2k to 2005 - works painlessly.
> Does anybody have clue what's the problem here?
>
|||Hi Ben
Here is an output from:
select name, type_desc, port, ip_address from sys.tcp_endpoints
select name, role_desc, state_desc from sys.database_mirroring_endpoints
name
type_desc
port ip_address
------
---- --
Dedicated Admin Connection
TSQL
0 NULL
TSQL Default TCP
TSQL
0 NULL
Endpoint_Mirroring
DATABASE_MIRRORING
5001 NULL
(3 row(s) affected)
name
role_desc
state_desc
------
----
Endpoint_Mirroring
ALL
STARTED
Yes, it's started.
In addition to it I found message which looks so innocent:
Login failed for user 'group\user'. [CLIENT: <local machine>]
I logged in with that user hundreds times for sure.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Hello,
> I supposed you can ping that server, right? :-)
> Is the endpoint started? When it is created the default is stopped. Check
> state_desc on
> select * from sys.database_mirroring_endpoints
> Always use full domain name.
> Check port is correct on sys.tcp_endpoints.
> Hope this helps,
> Ben Nevarez
>
>
> "Gene." wrote:
|||Gene,
According to that output the port number is 5001 not 5000. So you should use
ALTER DATABASE test
SET PARTNER =
'TCP://pc500:5001'
Please add the full domain name too.
Please test this and see if it works.
Hope this helps,
Ben Nevarez
"Gene." wrote:
[vbcol=seagreen]
> Hi Ben
> Here is an output from:
> select name, type_desc, port, ip_address from sys.tcp_endpoints
> select name, role_desc, state_desc from sys.database_mirroring_endpoints
>
> name
> type_desc
> port ip_address
> ------
> ---- --
> Dedicated Admin Connection
> TSQL
> 0 NULL
> TSQL Default TCP
> TSQL
> 0 NULL
> Endpoint_Mirroring
> DATABASE_MIRRORING
> 5001 NULL
> (3 row(s) affected)
> name
> role_desc
> state_desc
> ------
> ----
> ----
> Endpoint_Mirroring
> ALL
> STARTED
>
> Yes, it's started.
> In addition to it I found message which looks so innocent:
> Login failed for user 'group\user'. [CLIENT: <local machine>]
> I logged in with that user hundreds times for sure.
>
> "Ben Nevarez" wrote:
|||Ben
That's correct. Principal uses 5000 port for it's own end point, but refers
to port 5001 of the partner. And vice verse.
I am using full domain names but for this post I used short ones. As I said
before, full domain names were tested with ping from both hosts. I also used
ip's in their place.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Gene,
> According to that output the port number is 5001 not 5000. So you should use
> ALTER DATABASE test
> SET PARTNER =
> 'TCP://pc500:5001'
> Please add the full domain name too.
> Please test this and see if it works.
> Hope this helps,
> Ben Nevarez
>
>
> "Gene." wrote:
|||Have you applied SP1, or better, SP2?
Is the login failed message from the user who is supposed to connect to the
endpoint? if so, assign connect permissions to the required logins like in
grant connect on endpoint::endpoint_mirroring to [user]
Hope this helps,
Ben Nevarez
"Gene." wrote:
[vbcol=seagreen]
> Ben
> That's correct. Principal uses 5000 port for it's own end point, but refers
> to port 5001 of the partner. And vice verse.
> I am using full domain names but for this post I used short ones. As I said
> before, full domain names were tested with ping from both hosts. I also used
> ip's in their place.
> "Ben Nevarez" wrote:
|||Hi Ben
It finaly started working.
The problem was quite simple.
I created end points and tried to alter db to communicate with partner.
Instead of it I had to dump and load partner with db and tran and only than
to finalize it's communication by altering db.
Thank you for your help anyway.
"Ben Nevarez" wrote:
[vbcol=seagreen]
> Have you applied SP1, or better, SP2?
> Is the login failed message from the user who is supposed to connect to the
> endpoint? if so, assign connect permissions to the required logins like in
> grant connect on endpoint::endpoint_mirroring to [user]
> Hope this helps,
> Ben Nevarez
>
>
> "Gene." wrote:

mirroring db: communication problem

Hi All
I am trying to test db mirroring. I went exactly as book says: started 2 sql
servers with the same domain accounts, created endpoints. Checked if
endpoints exist and listen - they do.
Than I try to alter test db:
ALTER DATABASE test
SET PARTNER = 'TCP://pc500:5000'
and get:
Msg 1418, Level 16, State 1, Line 2
The server network address "TCP://pc500:5000" can not be reached or does not
exist. Check the network address name and that the ports for the local and
remote endpoints are operational.
pc500 is a partner pc.
I also tried to use full domain name and ip addres. Each time I removed
endpoints and checked from os prompt if anything listens on the port - no.
But no matter what I do, I get this error. I also checked with my sysadmin
if there is any kind of filtering or firewalls - no.
As a matter of fact, pc500 is virtual pc which resides on my pc.
It does not work. I tried replication from 2005 to 2005 - the same problem.
But replication from 2k to 2005 - works painlessly.
Does anybody have clue what's the problem here?Hello,
I supposed you can ping that server, right? :-)
Is the endpoint started? When it is created the default is stopped. Check
state_desc on
select * from sys.database_mirroring_endpoints
Always use full domain name.
Check port is correct on sys.tcp_endpoints.
Hope this helps,
Ben Nevarez
"Gene." wrote:
> Hi All
> I am trying to test db mirroring. I went exactly as book says: started 2 sql
> servers with the same domain accounts, created endpoints. Checked if
> endpoints exist and listen - they do.
> Than I try to alter test db:
> ALTER DATABASE test
> SET PARTNER => 'TCP://pc500:5000'
> and get:
> Msg 1418, Level 16, State 1, Line 2
> The server network address "TCP://pc500:5000" can not be reached or does not
> exist. Check the network address name and that the ports for the local and
> remote endpoints are operational.
> pc500 is a partner pc.
> I also tried to use full domain name and ip addres. Each time I removed
> endpoints and checked from os prompt if anything listens on the port - no.
> But no matter what I do, I get this error. I also checked with my sysadmin
> if there is any kind of filtering or firewalls - no.
> As a matter of fact, pc500 is virtual pc which resides on my pc.
> It does not work. I tried replication from 2005 to 2005 - the same problem.
> But replication from 2k to 2005 - works painlessly.
> Does anybody have clue what's the problem here?
>|||Hi Ben
Here is an output from:
select name, type_desc, port, ip_address from sys.tcp_endpoints
select name, role_desc, state_desc from sys.database_mirroring_endpoints
name
type_desc
port ip_address
------
---- --
---
Dedicated Admin Connection
TSQL
0 NULL
TSQL Default TCP
TSQL
0 NULL
Endpoint_Mirroring
DATABASE_MIRRORING
5001 NULL
(3 row(s) affected)
name
role_desc
state_desc
------
----
----
Endpoint_Mirroring
ALL
STARTED
Yes, it's started.
In addition to it I found message which looks so innocent:
Login failed for user 'group\user'. [CLIENT: <local machine>]
I logged in with that user hundreds times for sure.
"Ben Nevarez" wrote:
> Hello,
> I supposed you can ping that server, right? :-)
> Is the endpoint started? When it is created the default is stopped. Check
> state_desc on
> select * from sys.database_mirroring_endpoints
> Always use full domain name.
> Check port is correct on sys.tcp_endpoints.
> Hope this helps,
> Ben Nevarez
>
>
> "Gene." wrote:
> > Hi All
> > I am trying to test db mirroring. I went exactly as book says: started 2 sql
> > servers with the same domain accounts, created endpoints. Checked if
> > endpoints exist and listen - they do.
> > Than I try to alter test db:
> >
> > ALTER DATABASE test
> > SET PARTNER => > 'TCP://pc500:5000'
> > and get:
> >
> > Msg 1418, Level 16, State 1, Line 2
> > The server network address "TCP://pc500:5000" can not be reached or does not
> > exist. Check the network address name and that the ports for the local and
> > remote endpoints are operational.
> >
> > pc500 is a partner pc.
> >
> > I also tried to use full domain name and ip addres. Each time I removed
> > endpoints and checked from os prompt if anything listens on the port - no.
> > But no matter what I do, I get this error. I also checked with my sysadmin
> > if there is any kind of filtering or firewalls - no.
> > As a matter of fact, pc500 is virtual pc which resides on my pc.
> >
> > It does not work. I tried replication from 2005 to 2005 - the same problem.
> > But replication from 2k to 2005 - works painlessly.
> >
> > Does anybody have clue what's the problem here?
> >|||Gene,
According to that output the port number is 5001 not 5000. So you should use
ALTER DATABASE test
SET PARTNER = 'TCP://pc500:5001'
Please add the full domain name too.
Please test this and see if it works.
Hope this helps,
Ben Nevarez
"Gene." wrote:
> Hi Ben
> Here is an output from:
> select name, type_desc, port, ip_address from sys.tcp_endpoints
> select name, role_desc, state_desc from sys.database_mirroring_endpoints
>
> name
> type_desc
> port ip_address
> ------
> ---- --
> ---
> Dedicated Admin Connection
> TSQL
> 0 NULL
> TSQL Default TCP
> TSQL
> 0 NULL
> Endpoint_Mirroring
> DATABASE_MIRRORING
> 5001 NULL
> (3 row(s) affected)
> name
> role_desc
> state_desc
> ------
> ----
> ----
> Endpoint_Mirroring
> ALL
> STARTED
>
> Yes, it's started.
> In addition to it I found message which looks so innocent:
> Login failed for user 'group\user'. [CLIENT: <local machine>]
> I logged in with that user hundreds times for sure.
>
> "Ben Nevarez" wrote:
> >
> > Hello,
> >
> > I supposed you can ping that server, right? :-)
> >
> > Is the endpoint started? When it is created the default is stopped. Check
> > state_desc on
> >
> > select * from sys.database_mirroring_endpoints
> >
> > Always use full domain name.
> >
> > Check port is correct on sys.tcp_endpoints.
> >
> > Hope this helps,
> >
> > Ben Nevarez
> >
> >
> >
> >
> > "Gene." wrote:
> >
> > > Hi All
> > > I am trying to test db mirroring. I went exactly as book says: started 2 sql
> > > servers with the same domain accounts, created endpoints. Checked if
> > > endpoints exist and listen - they do.
> > > Than I try to alter test db:
> > >
> > > ALTER DATABASE test
> > > SET PARTNER => > > 'TCP://pc500:5000'
> > > and get:
> > >
> > > Msg 1418, Level 16, State 1, Line 2
> > > The server network address "TCP://pc500:5000" can not be reached or does not
> > > exist. Check the network address name and that the ports for the local and
> > > remote endpoints are operational.
> > >
> > > pc500 is a partner pc.
> > >
> > > I also tried to use full domain name and ip addres. Each time I removed
> > > endpoints and checked from os prompt if anything listens on the port - no.
> > > But no matter what I do, I get this error. I also checked with my sysadmin
> > > if there is any kind of filtering or firewalls - no.
> > > As a matter of fact, pc500 is virtual pc which resides on my pc.
> > >
> > > It does not work. I tried replication from 2005 to 2005 - the same problem.
> > > But replication from 2k to 2005 - works painlessly.
> > >
> > > Does anybody have clue what's the problem here?
> > >|||Ben
That's correct. Principal uses 5000 port for it's own end point, but refers
to port 5001 of the partner. And vice verse.
I am using full domain names but for this post I used short ones. As I said
before, full domain names were tested with ping from both hosts. I also used
ip's in their place.
"Ben Nevarez" wrote:
> Gene,
> According to that output the port number is 5001 not 5000. So you should use
> ALTER DATABASE test
> SET PARTNER => 'TCP://pc500:5001'
> Please add the full domain name too.
> Please test this and see if it works.
> Hope this helps,
> Ben Nevarez
>
>
> "Gene." wrote:
> > Hi Ben
> >
> > Here is an output from:
> >
> > select name, type_desc, port, ip_address from sys.tcp_endpoints
> > select name, role_desc, state_desc from sys.database_mirroring_endpoints
> >
> >
> >
> > name
> > type_desc
> > port ip_address
> > ------
> > ---- --
> > ---
> > Dedicated Admin Connection
> > TSQL
> > 0 NULL
> > TSQL Default TCP
> > TSQL
> > 0 NULL
> > Endpoint_Mirroring
> > DATABASE_MIRRORING
> > 5001 NULL
> >
> > (3 row(s) affected)
> >
> > name
> > role_desc
> > state_desc
> > ------
> > ----
> > ----
> > Endpoint_Mirroring
> > ALL
> > STARTED
> >
> >
> >
> > Yes, it's started.
> >
> > In addition to it I found message which looks so innocent:
> >
> > Login failed for user 'group\user'. [CLIENT: <local machine>]
> >
> > I logged in with that user hundreds times for sure.
> >
> >
> > "Ben Nevarez" wrote:
> >
> > >
> > > Hello,
> > >
> > > I supposed you can ping that server, right? :-)
> > >
> > > Is the endpoint started? When it is created the default is stopped. Check
> > > state_desc on
> > >
> > > select * from sys.database_mirroring_endpoints
> > >
> > > Always use full domain name.
> > >
> > > Check port is correct on sys.tcp_endpoints.
> > >
> > > Hope this helps,
> > >
> > > Ben Nevarez
> > >
> > >
> > >
> > >
> > > "Gene." wrote:
> > >
> > > > Hi All
> > > > I am trying to test db mirroring. I went exactly as book says: started 2 sql
> > > > servers with the same domain accounts, created endpoints. Checked if
> > > > endpoints exist and listen - they do.
> > > > Than I try to alter test db:
> > > >
> > > > ALTER DATABASE test
> > > > SET PARTNER => > > > 'TCP://pc500:5000'
> > > > and get:
> > > >
> > > > Msg 1418, Level 16, State 1, Line 2
> > > > The server network address "TCP://pc500:5000" can not be reached or does not
> > > > exist. Check the network address name and that the ports for the local and
> > > > remote endpoints are operational.
> > > >
> > > > pc500 is a partner pc.
> > > >
> > > > I also tried to use full domain name and ip addres. Each time I removed
> > > > endpoints and checked from os prompt if anything listens on the port - no.
> > > > But no matter what I do, I get this error. I also checked with my sysadmin
> > > > if there is any kind of filtering or firewalls - no.
> > > > As a matter of fact, pc500 is virtual pc which resides on my pc.
> > > >
> > > > It does not work. I tried replication from 2005 to 2005 - the same problem.
> > > > But replication from 2k to 2005 - works painlessly.
> > > >
> > > > Does anybody have clue what's the problem here?
> > > >|||Have you applied SP1, or better, SP2?
Is the login failed message from the user who is supposed to connect to the
endpoint? if so, assign connect permissions to the required logins like in
grant connect on endpoint::endpoint_mirroring to [user]
Hope this helps,
Ben Nevarez
"Gene." wrote:
> Ben
> That's correct. Principal uses 5000 port for it's own end point, but refers
> to port 5001 of the partner. And vice verse.
> I am using full domain names but for this post I used short ones. As I said
> before, full domain names were tested with ping from both hosts. I also used
> ip's in their place.
> "Ben Nevarez" wrote:
> >
> > Gene,
> >
> > According to that output the port number is 5001 not 5000. So you should use
> >
> > ALTER DATABASE test
> > SET PARTNER => > 'TCP://pc500:5001'
> >
> > Please add the full domain name too.
> >
> > Please test this and see if it works.
> >
> > Hope this helps,
> >
> > Ben Nevarez
> >
> >
> >
> >
> > "Gene." wrote:
> >
> > > Hi Ben
> > >
> > > Here is an output from:
> > >
> > > select name, type_desc, port, ip_address from sys.tcp_endpoints
> > > select name, role_desc, state_desc from sys.database_mirroring_endpoints
> > >
> > >
> > >
> > > name
> > > type_desc
> > > port ip_address
> > > ------
> > > ---- --
> > > ---
> > > Dedicated Admin Connection
> > > TSQL
> > > 0 NULL
> > > TSQL Default TCP
> > > TSQL
> > > 0 NULL
> > > Endpoint_Mirroring
> > > DATABASE_MIRRORING
> > > 5001 NULL
> > >
> > > (3 row(s) affected)
> > >
> > > name
> > > role_desc
> > > state_desc
> > > ------
> > > ----
> > > ----
> > > Endpoint_Mirroring
> > > ALL
> > > STARTED
> > >
> > >
> > >
> > > Yes, it's started.
> > >
> > > In addition to it I found message which looks so innocent:
> > >
> > > Login failed for user 'group\user'. [CLIENT: <local machine>]
> > >
> > > I logged in with that user hundreds times for sure.
> > >
> > >
> > > "Ben Nevarez" wrote:
> > >
> > > >
> > > > Hello,
> > > >
> > > > I supposed you can ping that server, right? :-)
> > > >
> > > > Is the endpoint started? When it is created the default is stopped. Check
> > > > state_desc on
> > > >
> > > > select * from sys.database_mirroring_endpoints
> > > >
> > > > Always use full domain name.
> > > >
> > > > Check port is correct on sys.tcp_endpoints.
> > > >
> > > > Hope this helps,
> > > >
> > > > Ben Nevarez
> > > >
> > > >
> > > >
> > > >
> > > > "Gene." wrote:
> > > >
> > > > > Hi All
> > > > > I am trying to test db mirroring. I went exactly as book says: started 2 sql
> > > > > servers with the same domain accounts, created endpoints. Checked if
> > > > > endpoints exist and listen - they do.
> > > > > Than I try to alter test db:
> > > > >
> > > > > ALTER DATABASE test
> > > > > SET PARTNER => > > > > 'TCP://pc500:5000'
> > > > > and get:
> > > > >
> > > > > Msg 1418, Level 16, State 1, Line 2
> > > > > The server network address "TCP://pc500:5000" can not be reached or does not
> > > > > exist. Check the network address name and that the ports for the local and
> > > > > remote endpoints are operational.
> > > > >
> > > > > pc500 is a partner pc.
> > > > >
> > > > > I also tried to use full domain name and ip addres. Each time I removed
> > > > > endpoints and checked from os prompt if anything listens on the port - no.
> > > > > But no matter what I do, I get this error. I also checked with my sysadmin
> > > > > if there is any kind of filtering or firewalls - no.
> > > > > As a matter of fact, pc500 is virtual pc which resides on my pc.
> > > > >
> > > > > It does not work. I tried replication from 2005 to 2005 - the same problem.
> > > > > But replication from 2k to 2005 - works painlessly.
> > > > >
> > > > > Does anybody have clue what's the problem here?
> > > > >|||Hi Ben
It finaly started working.
The problem was quite simple.
I created end points and tried to alter db to communicate with partner.
Instead of it I had to dump and load partner with db and tran and only than
to finalize it's communication by altering db.
Thank you for your help anyway.
"Ben Nevarez" wrote:
> Have you applied SP1, or better, SP2?
> Is the login failed message from the user who is supposed to connect to the
> endpoint? if so, assign connect permissions to the required logins like in
> grant connect on endpoint::endpoint_mirroring to [user]
> Hope this helps,
> Ben Nevarez
>
>
> "Gene." wrote:
> > Ben
> >
> > That's correct. Principal uses 5000 port for it's own end point, but refers
> > to port 5001 of the partner. And vice verse.
> > I am using full domain names but for this post I used short ones. As I said
> > before, full domain names were tested with ping from both hosts. I also used
> > ip's in their place.
> >
> > "Ben Nevarez" wrote:
> >
> > >
> > > Gene,
> > >
> > > According to that output the port number is 5001 not 5000. So you should use
> > >
> > > ALTER DATABASE test
> > > SET PARTNER => > > 'TCP://pc500:5001'
> > >
> > > Please add the full domain name too.
> > >
> > > Please test this and see if it works.
> > >
> > > Hope this helps,
> > >
> > > Ben Nevarez
> > >
> > >
> > >
> > >
> > > "Gene." wrote:
> > >
> > > > Hi Ben
> > > >
> > > > Here is an output from:
> > > >
> > > > select name, type_desc, port, ip_address from sys.tcp_endpoints
> > > > select name, role_desc, state_desc from sys.database_mirroring_endpoints
> > > >
> > > >
> > > >
> > > > name
> > > > type_desc
> > > > port ip_address
> > > > ------
> > > > ---- --
> > > > ---
> > > > Dedicated Admin Connection
> > > > TSQL
> > > > 0 NULL
> > > > TSQL Default TCP
> > > > TSQL
> > > > 0 NULL
> > > > Endpoint_Mirroring
> > > > DATABASE_MIRRORING
> > > > 5001 NULL
> > > >
> > > > (3 row(s) affected)
> > > >
> > > > name
> > > > role_desc
> > > > state_desc
> > > > ------
> > > > ----
> > > > ----
> > > > Endpoint_Mirroring
> > > > ALL
> > > > STARTED
> > > >
> > > >
> > > >
> > > > Yes, it's started.
> > > >
> > > > In addition to it I found message which looks so innocent:
> > > >
> > > > Login failed for user 'group\user'. [CLIENT: <local machine>]
> > > >
> > > > I logged in with that user hundreds times for sure.
> > > >
> > > >
> > > > "Ben Nevarez" wrote:
> > > >
> > > > >
> > > > > Hello,
> > > > >
> > > > > I supposed you can ping that server, right? :-)
> > > > >
> > > > > Is the endpoint started? When it is created the default is stopped. Check
> > > > > state_desc on
> > > > >
> > > > > select * from sys.database_mirroring_endpoints
> > > > >
> > > > > Always use full domain name.
> > > > >
> > > > > Check port is correct on sys.tcp_endpoints.
> > > > >
> > > > > Hope this helps,
> > > > >
> > > > > Ben Nevarez
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Gene." wrote:
> > > > >
> > > > > > Hi All
> > > > > > I am trying to test db mirroring. I went exactly as book says: started 2 sql
> > > > > > servers with the same domain accounts, created endpoints. Checked if
> > > > > > endpoints exist and listen - they do.
> > > > > > Than I try to alter test db:
> > > > > >
> > > > > > ALTER DATABASE test
> > > > > > SET PARTNER => > > > > > 'TCP://pc500:5000'
> > > > > > and get:
> > > > > >
> > > > > > Msg 1418, Level 16, State 1, Line 2
> > > > > > The server network address "TCP://pc500:5000" can not be reached or does not
> > > > > > exist. Check the network address name and that the ports for the local and
> > > > > > remote endpoints are operational.
> > > > > >
> > > > > > pc500 is a partner pc.
> > > > > >
> > > > > > I also tried to use full domain name and ip addres. Each time I removed
> > > > > > endpoints and checked from os prompt if anything listens on the port - no.
> > > > > > But no matter what I do, I get this error. I also checked with my sysadmin
> > > > > > if there is any kind of filtering or firewalls - no.
> > > > > > As a matter of fact, pc500 is virtual pc which resides on my pc.
> > > > > >
> > > > > > It does not work. I tried replication from 2005 to 2005 - the same problem.
> > > > > > But replication from 2k to 2005 - works painlessly.
> > > > > >
> > > > > > Does anybody have clue what's the problem here?
> > > > > >

Mirroring databases connected through a View

I have two databases db_A_primary and db_B_primary, both databases are on one Primary server.

db_B_primary has a View into db_A_primary.

Scenario: db_A_primary goes down and failsover to db_A_mirror on the Mirror server.

In this scenario when the View in db_B_primary is accessed will it automatically be redirected to look at the db_A_mirror database on the Mirror server?

Barry.

When the database fails over, it won't change the contents of the database. If you want the view to always point to a specific server.database.owner.table, you will want to specify it that way in the application. In other cases, you might want the view to point to a local table and wouldn't want to point to a remote server after failover. The bottom line is that it is up to the application to set the behavior desired.

Regards,

Matt Hollingsworth

Sr. Program Manager

Microsoft SQL Server

|||

Your mirrored database can not have a different name from the principal database. Perhaps you meant Server Name?

You can't do this with a view, but in stored procedures, you can use a try/catch to execute a dynamic query on the live server.

Begin Try

Exec sp_executesql N'Select * From db_A_primary.dbo.ATable'

End Try

Begin Catch

Exec sp_executesql N'Select * From MirrorServer.db_A_primary.dbo.ATable'

End Catch

Mirroring confusion.

SQL2K5
SP1
I am testing out Synchronous Mirroring and have a question about failover.
It seems the only way I can failover to the Mirror box is to log onto the
Principal box and hit the Failover button? Isn't the whole point of
mirroring to be able to handle the Principal not being available? Is there
another way? To clarify, I have no witness and am attempting a manual
failover.
TIA, ChrisRHi Chris,
I believe the option you are looking for is as follows from bol:
1.. Connect to the mirror server.
2.. Issue the following statement:
ALTER DATABASE <database_name> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS
where <database_name> is the mirrored database.
The mirror server immediately transitions to principal server, and
mirroring is suspended.
Regards
Jamie
"ChrisR" <NotAChance@.ms.com> wrote in message
news:O9tTWmHyGHA.4232@.TK2MSFTNGP05.phx.gbl...
> SQL2K5
> SP1
> I am testing out Synchronous Mirroring and have a question about failover.
> It seems the only way I can failover to the Mirror box is to log onto the
> Principal box and hit the Failover button? Isn't the whole point of
> mirroring to be able to handle the Principal not being available? Is there
> another way? To clarify, I have no witness and am attempting a manual
> failover.
> TIA, ChrisR
>sql

Mirroring confusion.

I am testing out Synchronous Mirroring and have a question about failover. It seems the only way I can failover to the Mirror box is to log onto the Principal box and hit the Failover button? Is the whole point of mirroring to be able to handle the Principal not being available? Is there another way?

TIA, ChrisRIn the event of a failure, the "witness" does that automagically.

-PatP|||Yes, but I am using "no witness" mirroring.|||You have to have a witness server to automatic failover.
The witness can be a stripped down server running SQL Server Express. It does not need to be a powerful platform or have a licensed install.|||Yes, but I am attempting a manual failover.