Scenario: Migrating changes to a development database

As a database administrator you often need to create a development database that is a subset of the production database. By working in the development database, you avoid endangering the production database with untested code.

Database administrators often create the development database by backing up the production database and restoring it to the development server. However, you do not typically need an entire production image or all of its data.

In this scenario, you have been asked to migrate the GOSALESCT schema from the GSDB database to the GSDBDEV database. The schema contains many tables. You will use the Compare and Migrate Objects wizard to make these changes.

Before you begin

This scenario is based on sample data that is provided in the GSDB database. To do the steps in this scenario, you must complete these two tasks:

Complete the following steps to migrate the GOSALESCT schema to the GSDBDEV database.

  1. Ensure that connections exist in the Administration Explorer for the GSDB database and the GSDBDEV database.
    • If a connection does not exist, on the Administration Explorer toolbar, click the drop-down button for New and click New Connection to a Database. In the wizard that opens, complete the details and then click Finish.
    • If a connection needs to be connected, right-click the database in the Administration Explorer and click Connect. In the wizard that opens, complete the details and then click Finish.
  2. Display the GSDBDEV database in the Object List and make the Object List active.
    • In the Administration Explorer, navigate to and click the GSDBDEV database.
    • Click anywhere in the Object List to make it active.
  3. Right-click the database and then click Migrate > Compare and Migrate Objects to start the Compare and Migrate Objects wizard.
  4. Complete the steps in the wizard.
    1. On the Migration Source page, click Database connection. Then, in the list of database connections, click GSDB.
    2. On the Choose Source Objects page:
      1. In the Select Object Type section, click the Schemas folder.
      2. In the Database Object Selection section, select the check box for GOSALESCT and click Add.
      3. Click Finish.
    3. On the Specify any Masks and Ignores page, click Next.
    4. On the Review and Apply Changes page in the Structural Comparison table:
      1. In the column for GSDB (source database model), find the GOSELECT schema.
      2. Click the GOSELECT schema and click the
        icon of an arrow that points to the right for the Copy from Left to Right icon
        (Copy from Left to Right) icon to copy the schema to GSDBDEV (target database model).
      3. Click Finish.

      Tip: Alternatively, you can find the differences between the source and target database models to copy the schema by using the

      image of an arrow that points down for the Next Difference icon
      (Next Difference) and
      image of an arrow that points up for the Previous Difference icon
      (Previous Difference) icons.

    A change plan is created automatically and includes the changes that are necessary to create the GOSALESCT schema in the GSDBDEV database. The change plan also includes changes to create the schema's dependent objects, such as the tables and views in the schema.

  5. Review and deploy the change plan:
    1. On the change plan toolbar, click the Generate DDL icon. When it generates correctly, click the Review and deploy changes (Review and deploy changes) icon.

      The Review and Deploy dialog opens and displays the generated change commands.

    2. Review the commands in the Review and Deploy dialog and then specify how to deploy the changes to the database.

Your GSDBDEV database catalog is now updated and includes the GOSALESCT schema. The status of running the commands is displayed in the SQL Results view.


Feedback