title: Copy SQL Server Express Database to Another Computer
body: <p>I am upsizing the back end of a client's Access app tomorrow and need to be ready with a plan for a particular problem with this client. The boss needs to be able to take the data file away from the office where the SQL Server is on a regular basis (usually monthly) and run statistical analyses on the data.</p>
  
  <p>I've looked at <a href="https://stackoverflow.com/questions/243583/easiest-way-to-copy-an-entire-sql-server-database-from-a-server-to-local-sql-expr">Easiest way to copy an entire SQL server Database from a server to local SQL Express</a>, and the solutions there don't work in this scenario because:</p>
  
  <ol>
  <li><p>can't use a one-time solution (Database Publishing Wizard), as this needs to be scriptable.</p></li>
  <li><p>can't use any method that depends on the two computers being networked, as that is not an option -- data has to be transferred via USB thumb drive (so, no replication).</p></li>
  <li><p>can't use any method that depends on running SQL Server management tools from the server console or from the workstation for the backup.</p></li>
  <li><p>can't connect to the SQL Server database directly for the analysis because the data has to be portable to other locations.</p></li>
  </ol>
  
  <p>What I think I need is some way to call a script that creates a backup file, then copy the result to the USB drive. I then need a second script to copy the backup file from the USB drive and restore it onto the other SQL Server.</p>
  
  <p>The data being transported is read-only (or, any changes made don't need to get back to the main server), and data won't be updated in the second location. It's currently scripted with a plain old batch file to copy the back-end MDB file, and I need something that is as simple for the user.</p>
  
  <p>It can't have any dependencies on, say, Powershell (of SQL Server Management Studio), because I don't want it to have to be installed on the computer the user is running the script from (there are a half dozen workstations the script needs to be runnable from, and I don't want to have to install something on all of those).</p>
  
  <p>I'm going to be setting up the backup agent to create a backup every night, so I could perhaps copy that file without needing to initiate the backup before copying. Thus I might only need to script the restore on the target computer.</p>
  
  <p>Thoughts, suggestions, pointers?</p>