Moving SQL volumes - better to 'take offline' or..

  • My sys guys are expanding volumes on my SQL server.

    So I have to stop SQL so they can move the data over to the new volumes.

    Is it better to:

    Take offline?

    Detach?

    Or just stop SQL service on server?

  • Expanding volumes meaning adding new space or moving the volume to a large underlying disk structure?

    If it's just expanding space, it shouldn't touch existing files and you ought to be fine, but I might check with the hardware vendor as they implement things differently.

  • Don't forget full backups beforehand.

  • The SQL storage is on a NAS device - so they are moving to a larger device.

    Which means they will copy and paste onto the new drives.

    Does it matter which way I shut down SQl?

  • They will not be able to move the SQL files unless you shut down SQL Server. Those files are always open when the database is in use and SQL Server is running.

  • You mean I have to stop the SQL service, correct?

  • Yes, check SQL Server Configuration Manager, click stop on the SQL Server database engine.

  • Thanks Steve

  • Beware that Paul Randal highly recommends backup/restore over detach/attach. He goes on to say that if you decide to go the detach/attach route be sure to "copy" the files and to do not "move" the files. Something about because if you use "move" and during the attach process SQL decides that you have a corrupt data file you're proper-screwed. IIRC

    🙂

    @SQLvariantI have a PowerShell script[/url] for you.

  • Aaron has an excellent point. I never move files, so it doesn't occur to me to mention it, but you should never MOVE a database file. If there is an issue in the move, you lose your file. Always copy the files.

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

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