Author |
Topic |
hameedf
Starting Member
27 Posts |
Posted - 2012-11-27 : 14:27:10
|
Hello experts !Is it possible to take offline backup of server 1 and restore and copy of database.bak to server 2 automatically?Any script ?ThanksHameed |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-11-27 : 15:16:34
|
Do you mean to Backup mdf and ndf files in Server 1 and then copy them to other Server Where SQL Server is installed with same version and then reattach them? Yes it is possible. |
|
|
hameedf
Starting Member
27 Posts |
Posted - 2012-11-27 : 15:47:56
|
Sodeep,I have one server 1(production server) sqlserver 2008 R2 and other Server 2(backup or standby server) sqlserver 2008 R2 .I need to take offline backup of server 1 and restore the backup of server 1 to server 2 and make a copy of database .bak and save on harddisk and then and again online server 1 ?will we do it automatically any script or some thing automation?ThanksHameed |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2012-11-27 : 17:32:04
|
Have you considered using some of the built in technologies that would accomplish the same end result? Specifically, Database Mirroring seems like a likely solution. In addition to keeping a copy of Server1's database available on Server2, it will automatically cut over to the second server if Server1 becomes unavailable. Depending on your requirements, Replication could also be your solution. Either Snapshot or Transactional Replication would keep a secondary copy of the database available for use if the need arises.=================================================We are far more concerned about the desecration of the flag than we are about the desecration of our land. -Wendell Berry |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-11-27 : 20:00:11
|
Depends on whether you need real time or not, you would have to use Database Mirroring for Automatic Failover. If you donot need real-time,Log shipping or Replication would be good choice for you. |
|
|
hameedf
Starting Member
27 Posts |
Posted - 2012-11-28 : 06:44:33
|
Bustaz Kool/sodeepThanks you very much !I go for data mirroing it really suits for my requirement. Please help me in the below cases?case 1: i need real time data in server 2 when server 1 fails then user will automatically connect to server 2 both servers are on the same location. If Server 1 back to online then is it possible that the server 2 data re mirrored to server 1.case2: Server 1 at location 1 and server 3 at location 2 same mirroing to server 1 to server 3 as required please.I really appreciated both of you please help me out ...ThanksHameed |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-11-29 : 10:43:44
|
quote: Originally posted by hameedf Bustaz Kool/sodeepThanks you very much !I go for data mirroing it really suits for my requirement. Please help me in the below cases?case 1: i need real time data in server 2 when server 1 fails then user will automatically connect to server 2 both servers are on the same location. If Server 1 back to online then is it possible that the server 2 data re mirrored to server 1.You can achieve this with Database Mirroring .If you have same SID in both server in both servers.case2: Server 1 at location 1 and server 3 at location 2 same mirroing to server 1 to server 3 as required please.Yes. but depends on network bandwidth.I really appreciated both of you please help me out ...ThanksHameed
|
|
|
hameedf
Starting Member
27 Posts |
Posted - 2012-11-29 : 13:42:48
|
Sodeep,Will you share some good link that help me to do data mirroing step by step configuration?ThanksHameed |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2012-11-29 : 14:02:21
|
I donot have right now but there should be article with Presentation if you search for it. |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2012-11-29 : 14:08:17
|
There is a connection string option (Failover Partner=MyServer2;) that can be added to your connection string that will cause the application to automatically use MyServer2 if it can't make the connection to MyServer1. The mirroring can be configured to automitically failover from the principal server to the mirror server.=================================================Hear the sledges with the bells - silver bells! What a world of merriment their melody foretells! |
|
|
|