30. Create Sandbox Database

  1. Open SQL Server Manager in Administrator mode.
  2. Logon to server .\SQLEXPRESS using windows authentication.
    show screen capture
  3. In the Object Explorer, right-click on Databases and select context menu option New Database.
  4. In the New Database window, type in the Database name of “sandbox” and click [OK].
    show screen capture
  5. Return to Visual Studio.
  6. From the Source Control Explorer, open solution $/!Developer/!CodeExamples/!CodeExamples.sln
    show screen capture
  7. Build the solution.
  8. In the Sandbox.SQL project, double-click on file ProjectToLocal.scmp in the Schema Comparisons folder.
  9. In the Select Source/Target Schema window, click [New Connection].
    show screen capture
  10. In the Connection Properties window, type “.\SQLEXPRESS” in the Server name field.
  11. Select the sandbox database.
  12. Click [OK].
    show screen capture
  13. Click [OK] in the Select Source/Target Schema window.
  14. In the SQL Toolbar, click the Write Updates icon.
    show screen capture
  15. Close the ProjectToLocal.scmp editor window, do not save changes.
  16. Undo changes to file ProjectToLocal.scmp.
  17. Close the !CodeExamples solution and return to your Sandbox project solution.
  18. Return to SQL Server Manager.
  19. Execute the following script:
    show code
    hide code
    use sandbox
    go
    exec prc_initialize_data
    go
  20. Verify the script runs without error.
  21. Close SQL Server Manager.