I am working on migrating databases from a 2017 SQL server to a 2016 version. The databases I am working with are hundreds of gigabytes so I am using generate script along with sqlcmd to restore.
However, when I restore the database on the new server it creates the tables and files them under the Master db rather than recreating the entire saved database. I want the exact same DB to be restored on the new server. Can anyone help me figure out what I am doing wrong?
Steps taken:
- Generate Script - Include Data and Schema
- Open cmpt prompt and enter: sqlcmd -S (servername) -i (file location)
The tables populate under the Master database instead of restoring the original database standalone.