Sql-server – Moving SQL Server database from old production server to new server

sql server

We had single production server for website and SQL Server database. We have plan to have a new production server for website and SQL Server. We need to move the SQL Server database from the old server to the new server.

So, how can I migrate/move the DB to new production server with less down time?

Thanks,
Velu.

Best Answer

If you use SQL Server 2005/2008 you can use mirroring:

  • install new SQL Server instance
  • create mirror database on this server from production server
  • wait until databases are synchronized
  • turn old server off
  • remove mirror from new server
  • recover mirrored database

Downtime = time to remove the mirror and recover the database

If you don't want to use mirroring, you can do the same work without mirroring:

  • install new SQL Server instance
  • create backup from production DB
  • copy and restore the production DB WITH NORECOVERY option on new server
  • turn the production database into single-user mode
  • make the transaction log backup
  • turn production server off
  • copy and restore the log WITH RECOVERY option on new server

Downtime = time to make log backup, copy and restore this backup on new server