Using a dump from another database to initialize in-memory and relaxed-durability databases

If you use a dump from another database to initialize the in-memory or relaxed-durability as a replicate database, the replicate database inherits the configuration of the database from which you obtained the dump.

StepsSetting up replication for the first time using a database dump

  1. Create the in-memory or relaxed-durability database:

    create inmemory database tokyo_db
    on imdb_cache_dev2 = '50' log on imdb_cache_dev_log2='50'
    with DURABILITY=NO_RECOVERY
    go
    
  2. Create the objects such as, tables and stored procedures, users, and permissions required to receive replicate data, or you can load a database dump.

  3. Use rs_init to create the Replication Server connection to the in-memory or relaxed-durability database.

  4. Perform a dump to save the current state of the in-memory or relaxed-durability database:

    1. Suspend the connection to the in-memory or relaxed-durability database:

      suspend connection to RDS.imdb1
      go
      
    2. Obtain a database dump of the in-memory or relaxed-durability database:

      dump database imdb1 to
      ‘/databases/dump/tokyo_db.dump’
      go
      
    3. Resume the connection to the in-memory or relaxed-durability database:

      resume connection to RDS.imdb1
      go
      

Recreating in-memory and relaxed-durability databases after an Adaptive Server shutdown

Because the in-memory and relaxed-durability databases are recreated when you restart Adaptive Server, you need to restore the data. Therefore, you must:

  1. Repopulate the recreated replicate in-memory or relaxed-durability database with a new dump or from any archived dumps taken from the replicate database.

    NoteIf the dump is not loaded from the dump of the source, there will be missing rows in the replicate tables.

    For example, to load the tokyo_db database from the original tokyo_db.source dump when the host Adaptive Server restarts:

    use master
    go
    sp_dboption tokyo_db, single, true
    go
    load database tokyo_db from ‘/databases/dump/tokyo_db.dump’
    go
    online database tokyo_db
    go
    sp_dboption tokyo_db, single, false
    go
    
  2. Resume the connection to the recreated replicate in-memory or relaxed-durability database.