SQL Server how to perform database refreshing ing

Source: Internet
Author: User

Let's see how to perform database initialization ing with screenshots: 
SelectPrincipal Database. Right click on the Database Name and selectPropertiesAnd then click on"Processing ing"The following window will appear:


  • Click on"Configure Security... "Button.


     

  • From the following window clickNextTo get started.


     

  • Here we have the option that if we want to use a witness server or not, selectYesAnd clickNext.


     

  • Again select if there is a need to use a witness server and clickNext.


     

  • Now first of all set upPrincipal Server.


     

  • Select the instance, click on the checkbox if we want to encrypt the data and define the listener port, which database refreshing ing will use to communicate with the other instances in the mirror. also select the endpoint name. clickNext.

    Note:We can use the default number/name or specify our own for both: Port, endpoint.
     

  • Secondly, set up the mirror server similarly as we have done for principal server: select the instance; select encrypt the data; Define the listener port and select the endpoint name and connect to it. after connecting successfully clickNext.

    Note:We can use the default number/name or specify our own for both: Port, endpoint.


     

  • Thirdly, it's time to set up the witness server as we have decided to use a witness previusly. so for this also select the instance; click to encrypt the data; Define the listener port and lastly select the endpoint name. again connect to it and clickNext.

    Note:For witness server also we can use the default number/name or specify our own for both: Port, endpoint.
     

  • Here we can set up special security credentials if we want to do (not compulsory ). because all of the instances for this demo are on the same server using the same accounts, they have been left blank. so directly clickNext.


     

  • Last but not the least click on"Finish ".


     

  • When we click on finish the following window configure the endpoints and shows its status means that it will show whether the process was successful setup or not.

    Note:We can also see the reports if we want to see.
     

  • Click onClose buttonAnd we will the following window on our desktop. To begin login ing select"Start processing ing"And the processing process will begin in. And if we want to make the changes than click on "do not start refreshing ing"


     

  • Finally our login ing will starts as shown below. And we can see in status box that the data has beenSynchronized between the principal and the mirror.



Note:We have some more options on this window which are as under:

Pause:This will stop transactions from being sent to our mirror.

Remove processing ing:This will remove the processing configuration.

Failover:This will allow us to manually fail over to our mirrored copy. Once we fail over the current principal becomes the mirror and the current mirror becomes the principal.

Now we can see the status on our MSSQL window, the database is showing like this:

Problem 1:

Error MSG 1416, level 16, State 31, line 3. database is not configured for database flushing:

Solution 1:

Restore the full backup from principal server using with norecovery option and also one transactional log backup from principal server using with norecovery option and then start processing ing.

Problem 2:

Error MSG 1418, level 16, state 1, line 1. The server network address cannot be reached or does not exist. Check the network address name and reissue the command.

Solution 2:

  1. Restore a fairly recent full backup to the planned mirror server, with norecovery
  2. Then restore a transaction log, also with norecovery
  3. Configure endpoints correctly.
  4. Check if the ports that selected are valid or not.
  5. Is there a firewall (hardware or software )?

Problem 3:

Error MSG. (Microsoft SQL Server, error 1475): "database login ing cannot be enabled because the database may have bulk logged changes that have not been backed up. the last log backup on the principal must be restored on the mirror"

Problem 4:

Error MSG: (Microsoft SQL Server, error 1478): The Mirror database has insufficient transaction log data to preserve the log backup chain of the principal database. this may happen if a log backup from the principal database has not been restored on the mirror database.

Problem 5:

Error MSG: (Microsoft SQL Server, error 1412): the remote copy of database has not been rolled forwarded to a point in time that is encompassed in the local copy of the transactional log.

Solution 3, 4, 5:

We got the above mentioned error when we start the synchronization for database locking. To start the synchronization successfully follow these steps:

    1. Principal instance-take a full backup and a log backup as well
    2. Copy the full/log backups from principal instance to mirror instance
    3. Mirror instance-restore with norecovery option the full backup
    4. Mirror instance-apply the log backup
    5. Principal instance-start Synchronization
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.