Copying SQL mdf & ldf files

Discussion in 'Windows Small Business Server' started by Bruce Clendenin, Apr 23, 2004.

  1. I have set up a set of SQL databases. I need to be able
    to copy the files for backup as well as to copy the
    current data to the web directory.

    I assume the files I need to copy for the SQL databases
    are the mdf and ldf files. Am I on the right track copying
    these file types?

    It appears that in order to move these files, I need to
    stop the SQL Server during the file copy. It then needs
    to be restarted after the process is complete. Can I do
    this in my batch file? What are the commands?

    After these files are copied and the SQL Server service
    restarts, will the SQL Server be able to use these new
    Bruce Clendenin, Apr 23, 2004
    1. Advertisements

  2. Bruce

    You need to go into SQL Enterprize Manager and set up a
    schedule to backup the databases during light activity.
    Then these Backup files on your hard disk can be part of
    your Daily backup. There is a Basic article on this at but a
    more thorough study of restoring a database is important
    because simply saving the mdf and ldf files is not enough.

    Frank McCallister
    Frank McCallister, Apr 24, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.