Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 » SQL Anywhere Server - Database Administration » Starting and connecting to your database » Working with database files » Creating a SQL Anywhere database


Create a database with a transaction log mirror

You can choose to maintain a transaction log mirror when you create a database. This option is available from the CREATE DATABASE statement, from Sybase Central, or from the dbinit utility.

For more information about why you may want to use a transaction log mirror, see Transaction log mirrors.

 To create a database that uses a transaction log mirror (Sybase Central)
  1. From the Tools menu, choose SQL Anywhere 12 » Create Database.

  2. Follow the instructions in the Create Database Wizard.

 To create a database that uses a transaction log mirror (SQL)
  • Use the CREATE DATABASE statement, with the TRANSACTION LOG and MIRROR clauses. For example:

    CREATE DATABASE 'c:\\mydb'
    MIRROR 'd:\\mydb.mlg';

    See CREATE DATABASE statement.

 To create a database that uses a transaction log mirror (command line)
  • Use the dbinit utility with the -m option. For example, the following command (which should be entered on one line) initializes a database named company.db, with a transaction log kept on a different device and a mirror on a third device.

    dbinit -t d:\log-dir\company.log -m
    e:\mirr-dir\company.mlg c:\db-dir\company.db

    See Initialization utility (dbinit).