
Database mirroring is a primarily software solution for increasing database availability. Database Mirroring basically maintain two copies of the database on different server. The server which is active and running is know as principal server and the server which supports the principal server when it goes down that server is know as Mirror server. There is a server called witness server which monitors principal server and checks if principal server fails then make sure database is available from mirror server.
1) To start mirroring firstly take the full backup of the database on principal server.
2) After that take transactional log backup of the same database on principal serer.
3) Then copy the backup files on mirror server.
4) Important: After copying the files on mirror server restore the full backup to the database on mirror server after ensuring you check the No Recovery option! In restore wizard, go to Options there you can see No Recovery option. This is vital!
5) Perform another restore of the Transaction Log, also with the No Recovery option. (This is important; otherwise you'll get an error when starting the mirror).

6) You'll notice that the database on the Mirror server now is marked as "Restoring..." and can't be accessed. This is normal and expected!

7) Now go to principal server and then right click the database which is to be mirrored select Task option then select Mirror option in it.

8) Click "Configure Security"
9) Click Next on the wizard
10) Choose whether you want a Witness server or not, (I am not using Witness servers) and click Next
11) In the Principal Server Instance stage, leave everything as its default (you can't change anything anyway)

12) In the Mirror Server Instance stage, choose your Mirror server from the dropdown and click Connect to provide the credentials. Click Next.

13) In the next dialog about Service Accounts, leave these blank (you only need to fill them in if the servers are in a domain or in trusted domains)
14) Click Next and Finish
15) Click Start Mirroring (if you do not have a FQDN entered, then a warning will appear, but you can ignore it)
16) The mirror should then start, and within moments, the Status should be "synchronized: the databases are fully synchronized"



Important Things to look out:
When you start mirroring if error comes like not able to find or connect the mirror server then
1) Try to find if the process is been running on port and try to telnet the port from both ends I mean from principal as well as mirror server.
2) If the process is running on the port and you can telnet the port then look out for the firewall. Make sure firewall is not blocking connection to port.
3) If you are not in the same domain then check router is not blocking the port for connection. ( I wasted some time on it).