Sql-server – Moving database from one server to another

azure-vmmigrationsql serversql-server-2012

I have a virtual machine running SQL Server 2012 in Azure and have also generated a script of my database to be run on the SQLSERVER2012 VM on Azure, however I am getting an error

"C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\PXDEV.mdf" failed with the operating system error 3 (The system cannot find the path specified.).

I have checked that path and the file is actually there on the source server.

Best Answer

Are you getting the error on the destination server?

Is the path present on the destination server?

You need to make sure that the paths defined in your CREATE DATABASE script exist on the destination server or you need to create them there.