Generating Database-Creation SQL for a Target Database

Generate SQL and load sequences to create target databases that differ from the source databases you back up, into which you can load database dumps.

Prerequisites
Backup Server must be running and you must have dump history enabled. To enable dump history, use:
sp_configure 'enable dump history', 1
See Utility Guide for details on backupserver.
Task

The Target Database DDL Generation wizard generates database-creation SQL using information from the dump history file. It extracts device and segment mapping information from dump images, then generates a sequence of create database and alter database commands. Use this wizard to generate a target database into which you can restore (load) a database you backed up

The wizard performs the load database command using the listonly=create_sql option.

  1. In the left pane of the Administration Console, expand ASE Servers > Schema Objects > Databases.
  2. Click the Name field of the database, then click the drop-down arrow and select Generate Target Database DDL.
  3. On the Introduction screen, specify the name of your target database.
  4. In the Options screen, generate the load sequence. By default, this option is unselected. To generate:
    • Database-reation SQL only, do not select Generate load sequence. Select Next to go to the Summary screen.
    • Both database-creation SQL and load sequence, select Generate load sequence. If you used a password to back up your database, enter it in the password field.
  5. If you selected Generate load sequence, you see the Point in Time screen. Select a dump time. By default, the point in time is set to the most recent database dump.
  6. (Optional) Click Summary to view your selected options.
  7. (Optional) Click Preview to view the SQL statement you generated with your settings. To save a copy of the SQL statement, click Save.