Consistent Database Copy

  • Hi All

    We are performing data center migration,Further we are moving data to storage server using snap mirror concept for SQL Server.But we are moving the data without detaching or stop SQL services.But we have doubt if we do without stopping sql services.Whether there will be a consisent database copy files on storage server.

    Could you please provide your view and suppoting links from Microsoft(So i can go for bussiness further to provide downtime).

  • For moving databases from one server to another, the safe method is to use SQL backup and restore.

    Doing the move using disk level copies is probably not a good idea, because a database may have files on multiple disks, and could only be safe if all disks were completely in-sync. At the very least, you would have to make sure that SQL Server services are all stopped.

  • You really need to check with the SAN vendor whether they guarantee consistency for databases.

    But in any case I would stop the application and then SQL services cleanly, especially as presumably the app needs repointing to the new server.

    ---------------------------------------------------------------------

  • I'm with Michael and George. USe backup/restore as a safety net, but I'd stop services and be sure the SNAP is consistent.

  • I am going to agree with the others - mostly.

    IF you are using SAN snap clone technology that is configured to work with SQL Server and freezes SQL Server during the snapshot process, then you will have a consistent copy of the mdf/ldf files. IF you are just using the snap shot capabilities, you need to be aware that snap shots are delta's from the original file. The snap shots will grow as data is added to the database and performance can be impacted.

    So, make sure you follow up with your SAN vendor and your server storage team to make sure before you continue.

    And finally, if you are looking at this process as a replacement for performing SQL Backups I would recommend against this approach. Every time I have looked at this type of solution, I have found the solutions lacking and have rolled back to native SQL Server backups.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Thanks everybody,

    Storage team is performing SNAP mirror a NETAPP tool,The snap mirror is not freezing I/O on drives while copying data. In be in safer end i will take backups of databases.There are few databases of 2Tb further i am bit worried if this data becomes inconsistent because i need to restore database in target it will take more time and outage.

    Details are below.

    SQL binaries is on C drive(local disk).

    Database files are on other drives that is SAN(HP EVA\MSA).

    Further in target data center(other site) data are copyied without stopping SQL Services.

    So before going to bussiness is there any other approach.

  • More questions than answers I am afraid...........

    SQL installs some components to the C drive so what is installed on the other server? Is there an identically installed instance of SQL waiting to receive the user database files? Does the snap include the system databases?

    If you are snapping more than just user database files I would be tempted to use database mirroring or logshipping for the failover, then the full database restore is done up front and you just have to failover. Personally I would go for mirroring, switch to synchronous mode just before the failover, stop all connections, swap roles, and once it was up and running break the mirror.

    Outage need not be more than about 15 minutes.

    ---------------------------------------------------------------------

  • Database mirroring or logshipping is a good suggestion but problem is we are doing data center migration along with DB servers and there are other application servers as well.

    But source server and target servers are in different network hence database mirroring or logshipping was suggested but not able to proceed further.

    OS team is performing image of C drive using platespin tool and restoring on target DC.Further i need to make database up.As data is in TBs and copying the data to TEMP Storage server is taking more than 24hours so bussiness is not agreeing for downtime.(to stop sql services) i understand without downtime or backup restore it is not possible.

  • virtual shadow copy service has been around since Windows 2003. if an application takes advantage of it then it can create snapshots and copy data outside the normal SQL methods

    we do something similar with EMC except it copies the disk data. once in a while we'll mount the databases at our DR location as a test

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply