DB Mirroring question?

  • Hi Mr. Perry,

    I have tested with automatic failover with witness server.

    Application currently connected to principal server,

    For the testing purpose, I stop the SQL services in principal server, then automatically mirror server to become a principal server and database state has changed for "PRINCIPAL, DISCONNECTED).

    after that application not able to connected particular database user and error is

    "can not open user default database, login failed Error - 4064.

    I can able to open database using sa user but database user can't open default database. I have checked due to default database user mapping removed automatically whenever changed mirror database to become a principal database.

    Please suggestion me how to resolve this issues?

    Thanks

    ananda

  • Whichever login/user you're using on the principal must be mimicked on the mirror, if you're going to failover. When you copied the database over to the mirror and established mirroring, did you make sure to "map" the database user to the corresponding login?

    This is the deprecated fix:

    http://sqltutorials.blogspot.com/2008/02/maps-existing-database-user-to-sql.html

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Hi everyone,

    Quick thing...Do we need to make changes to the connection strings of a web/app server config file if we implement DB mirroing in high performance automatic failover mode? I am referring to the DB Servername..

    “If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams

  • Yes, check this:

    http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/10/19/database-mirroring-connection-strings-_2D00_-automatic-failover.aspx

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Thanks for the info...so what are the best high availability options that we have where we need not worry about changing connection strings irrspective of automatic or manual failover?

    “If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams

  • I meant anything other than using FailoverPartner in High performance mirroring.

    “If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams

  • FYI http://www.connectionstrings.com/sql-server-2008 also holds some examples on how to define connection strings for mirrored databases.

    When specifying a failover partner, your apps will automatically connect to the primary db.

    Keep in mind a failover will cause all active connections to be lost !

    So your apps will have to reconnect and work from there on (meaning you should take good care of unit of work)

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Your only other option is clustering, if you don't want to change connection strings. There's lots of discussions/articles regarding high availability for SQL Server, they'll have more information for you.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • SQLDCH (10/27/2011)


    Your only other option is clustering, if you don't want to change connection strings. There's lots of discussions/articles regarding high availability for SQL Server, they'll have more information for you.

    +1

    clustering. Is another HA. Option which has its own downsides.

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • ALZDBA (10/28/2011)


    clustering. Is another HA. Option which has its own downsides.

    and overkill if you only have a handful of databases

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • I have very few databases that I am planning on HA...but the transaction rate is very high..almost 10 million inserts to one table a day

    “If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams

  • Dear All,

    I have question about Mirroring performance between principal and mirror database.

    OS - windows 2008 R2 Enterprise edition.

    SQL - SQL SERVER 2008 R2 Standard Edition.

    Initial stage database size 20 GB then after 10 years database size become a 300 GB approximately , I want to know, So In this situational what about database performance in mirroring setup, please tell me what is "Positive " & "Negative" point of mirroring setup.

    Give me any standard document or URL for followup mirroring setup.

    Thanks

    ananda

  • for starters: Database Mirroring Overview

    soup: How to: Configure a Database Mirroring Session (SQL Server Management Studio)

    main course:SQL Server Replication: Providing High Availability using Database Mirroring

    Desert:Database Mirroring in SQL Server 2008 R2 and SQL Server 2008

    Coffee afterward ?

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 13 posts - 16 through 27 (of 27 total)

You must be logged in to reply to this topic. Login to reply