How to use SQL Server manager to move the Database & Logs to different drive ?

Senior IT System Engineer
Senior IT System Engineer used Ask the Experts™
on
I had this question after viewing Migrating C:\ only in a VM to another VMDK disk ?.

Hi People,

based on the suggestion shared by one of the experts as above thread, how can I use the SQL Server manager to safely migrate the SQL Database and logs from the below Disk 0:
Disk partition layout

Into another newly added drive without causing downtime or database issue on the application setting side ?
[Hopefully I do not have to modify anything from the application perspactive]

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Consultant
Top Expert 2016
Commented:
>>without causing downtime

That is not possible from what I know.

The easiest way would be to do a detach of your database (database would then be not available), move your files to your new drive and reattach your database.
Top Expert 2014
Commented:
"without causing downtime" is not possible, you can use ALTER DATABASE or the server manager to define the new database location but then you have to stop the particular database, move the files and then start it again.
Top Expert 2014

Commented:
Actually it is probably possible to migrate DISK1 or DISK2 with Storage vMotion, because Windows and SQL wouldn't know it was happening and the drive letters wouldn't change.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Andy,

Do you mean clone the VM and then specifying the custom VMDK drive to be cloned ?
and then re-attached the cloned disk to the existing VM ?
Top Expert 2014

Commented:
Not cloning but migrating using svMotion if you have the license for it. svMotion via the GUI moves the whole thing but with the CLI you can move individual disks, https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004040

Author

Commented:
Hi Andy,
Yes I do have Enterprise Plus license.

Am I able to svMotion just one VMDK and then resize it on the fly to another VMDK disk ?

Author

Commented:
Thanks all !

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial