Moving your database tables to a new database

ADVANCED USERS ONLY!
To do this really easily with SQL Server 2014 Management Studio:

1.) Right click on the database (not the table) and select Tasks -> Generate Scripts

location of tool

2.) Click Next on the first page

3.) If you want to copy the whole database, just click next. 

4.) Select “Save to File”.  IMPORTANT: Click the Advanced button next to “Save to File”, find “Types of data to script”, and change “Schema only” to “Schema and data”.

adding data to the script

5.) Click through and confirm the rest and you’re done!

6.) To restore, install CRS on your new machine using CRS Full Installer.  When you are asked if you are a NEW or Existing CRS user, select NEW, then install SQL Server using the defaults.  Ensure you can connect to the database.

7.) Click Button 1 – Check is SQL Server is Installed and click Button 2 – Create Database.  DO NOT CREATE TABLES – this will be done from the script you created above.

8.) Open the newly created blank CRS database via SQL Management Studio (on a new PC you will need to install this first).  Open the SQL file created in 5.) above.  Ensure “Using [CRS]” is the first line.  If it says Using [Master] then change it to Using [CRS].  

Click execute and all your database will be restored.