Generating Alter Script for Databases
Alter Script allows you to quickly generate alter script for a database after you make changes to a model. Although you can generate alter script using the Complete Compare wizard, the alter script generation option allows you to bypass the detailed compare features presented in the Complete Compare wizard.
This topic walks you through the steps to generate alter script for a Snowflake database model as an example. Similarly, you can generate alter script for a list of databases models based on your requirements. Also, the Forward Engineering Alter Script Schema Generation Wizard has different configuration sections specific to database. For more information on database specific forward engineering alter script generation options, refer to Forward Engineering Options for Databases topic.
To generate alter script for a database, follow these steps:
- Open a Snowflake model in erwin DM.
Ensure that you are in the Physical mode.
- Click Action > Alter Script.
The Forward Engineering Alter Script Schema Generation Wizard appears. - Click Option Selection.
The Option Selection section displays the default option set. Select schema generation group to select schema generation options based on your requirements.
Similarly, you can select schema generation syntax options for other databases. - Click Next.
The Summary section appears. It displays the selected options for schema generation. - Review your option selection or edit the selection if required.
- Click Next.
The Owner Override section appears. It displays objects for owner override. - Enter an owner name to the Global Override object to override all assignments for the listed object groups. Or, enter an owner name for other object in this section to override assignments only to that object.
The Global Override section is not available for all databases.
- Click Next.
The Table Filter section appears. It displays a list of tables available in the model. Similarly, you can filter Collections or Records for other databases. - Select the tables in the list that you want to forward engineer.
Similarly, you can select Collections or Records for other databases based on your requirement. - Click Preview to view the schema script.
-
Save (): Use this option to save the generated script in JSON or BSON format.
-
Print (): Use this option to search for a word or characters in the schema.
-
Search (): Use this option to search for a word or characters in the schema.
-
Copy (): Use this option to copy the script.
-
Replace (): Use this option to find and replace characters in the script.
-
Text Options (): Use this option to configure the preview text editor's look and feel, such as window, font, syntax color settings. For more information, refer to the Forward Engineering Wizard - Preview Editor topic.
- Click Generate.
The forward engineering process starts. The script generates the physical database schema. You can view and verify the generated alter script for the database.
On the Preview section, use the following options:
Copyright © 2023 Quest Software, Inc. |