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.
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?
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
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.
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 ...
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 ...
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!