I'm a PostgreSQL DBA learning SQL Server 2019.

The setup :

  • 1 Desktop, 1 Laptop
  • Both running SQL Server 2019 Developer
  • Windows 10 Home (nothing else, no active directory, nas, san, ...)
  • a database in simple recovery model, with partial containment enabled

The problem :

  • I want to be able to synchronize a database from my laptop to the desktop, or the other way around
  • I don't want to use replication (log shipping or others) since I may not connect both servers for a long time and my laptop is very limited in disk space. (I'm in simple recovery model for the same reasons)
  • both (desktop/laptop) database must be writable (so no primary/secondary)
  • if the database is modified on both side, I'll lose modification on one side. It's ok! I accept this.

The solution I know :

  • Create a SQL Server dump, send it to the desktop over shared network, apply the dump. or the other way around.

Is there a way to export a database to another database, on demand ? Or is the dump/transfer/restore the way to go ? (that's what I would do with PostgreSQL)

I don't know all the SQL Server keywords and terminology and my google-fu was unsuccessful. Most solutions I find are obviously about how to set up replication over a reliable/permanent network. which doesn't fit my requirements.

  • now that i think about, i haven't looked at any "import" option, there might be a more readily available option to import data from another database, instead of the other way around (exporting to a database) – ker2x Jul 21 '20 at 19:40

Well... it turn out it couldn't be easier.

Right click on database -> Tasks -> Copy database...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.