I'm trying to migrate my database to another server, an older version. Currently my database is on SQL Server 2014, but I need to add migrate it to SQL Server 2012 because that's the one my server has.
I installed both versions of the server (2012 and 2014) on my local machine. Created the script with the correct version (from the 2014 edition server, following "Tasks->Generate Scripts" with both schema and data, since my data is quite small in size), and now I'm trying to execute the script, but I got the following message:
Msg 5170, Level 16, State 1, Line 2
Cannot create file 'C:\Program Files....mdf' because it already exists. Change the file path or the file name, and retry the operation.
I understand the script is trying to create a database that already exists, so do I need to change the script?