Define a Db2 LUW Sequence
Use the Sequence editor to define the parameters for a Db2 sequence.
To define a Db2 sequence
- Right-click a Sequence in the Model Explorer and select Properties.
The Db2 Sequence Editor opens.
- Select a sequence and work with the following options:
Click New
on the toolbar to create a sequence. Use the Enter filter text text box to filter a large list of names to locate the one you want to work with.
- Name
Specifies the name of the sequence.
- Schema
Specifies the default schema for the sequence. Select a schema from the drop-down list.
- Physical Data Type
Specifies the physical data type for the sequence. Select a data type from the drop-down list.
- Use Replace Syntax
Specifies that Forward Engineering will use the CREATE or REPLACE command instead of the CREATE command.
This field applies to Db2 for LUW version 9.7 only.
- Generate
Specifies whether or not to generate DDL for this object during Forward Engineering.
- Work with the following fields on the General tab:
- Starting Value
Specifies the first value for the sequence.
- Increment By
Specifies the interval between consecutive values of the sequence.
- Specify Minimum Value/Minimum Value
Specifies if you want to indicate the minimum value for the sequence. When you select True from the drop-down list, a second field appears, where you can indicate the value.
- Specify Maximum Value/Maximum Value
Specifies if you want to indicate the maximum value for the sequence. When you select True from the drop-down list, a second field appears, where you can indicate the value.
- Cycle Values
Specifies that the value of a sequence that reaches its maximum or minimum value to generate its respective minimum value or maximum value on the following NEXT VALUE expression. You can select Cycle or No Cycle.
- Cache Values
Specifies the maximum number of sequence values that the database manager generates and stores in memory. When you select True from the drop-down list, the field Cache Capacity appears, where you can indicate the value.
- Order Values
Specifies whether or not the sequence numbers must be generated in order of request.
- Work with the following fields on the Alias tab:
- Name
Specifies the name of the sequence. The first name is always the sequence that you have currently selected. Click the New icon (icon) to create an alias.
- Schema
Specifies the schema to associate with the alias sequence. Select a schema from the drop-down list.
The Alias tab for a Sequence applies to Db2 for LUW version 9.7 only.
- Click the Permission tab and grant permissions to users or roles on the selected sequence.
- (Optional) Click the Comment tab and enter any comments that you want to associate with the object.
- (Optional) Click the UDP tab to work with user-defined properties for the object.
- (Optional) Click the Notes tab to view and edit user notes.
- Click Close.
The Db2 for LUW Sequence Editor closes.
Copyright © 2025 Quest Software, Inc. |