Using a Database Dump to Set Up Replication for a Primary In-Memory Database

You can set up replication if you use a dump from another database to initialize the in-memory or relaxed-durability as a primary database. The primary in-memory or relaxed-durability database inherits the configuration of the database from which you obtained the dump.

  1. Create the in-memory or relaxed-durability database:
    create inmemory database ny_db
    on imdb_cache_dev2 = '50' log on imdb_cache_dev_log2='50'
    with DURABILITY=NO_RECOVERY
    go
  2. Use rs_init to add the primary in-memory database to the replication system.
  3. Obtain a dump from the database that you want to use load the new in-memory database you created.
  4. Load the in-memory database from the database dump.
    For example:
    use master
    go
    sp_dboption ny_db, single, true
    go
    load database ny_db from '/remote/Based_on_loaddb/IMDB.dump'
    go
    online database ny_db
    go
    sp_dboption ny_db, single, false
    go
  5. Start RepAgent on the database:
    sp_start_rep_agent ny_db
    go
  6. Optionally, resume the DSI connection from Replication Server to the primary database.