Creating a Sequence Generator

Create a sequence generator on a specified resource.

Prerequisites
Database Version Sequence Generator Privileges
SAP Sybase IQ 15.3 and 15.4 You must have one of:
  • DBA authority
  • RESOURCE authority
SAP Sybase IQ 16.0 You must have one of:
  • CREATE ANY SEQUENCE system privilege
  • CREATE ANY OBJECT system privilege
Task
  1. In the Perspective Resources view, select the resource, and select Resource > Administration Console.
  2. In the left pane, expand IQ Servers > Schema Objects, and then select Sequence Generators.
  3. Click the arrow next to Sequence Generators and select New.
    The Create Sequence Wizard appears.
  4. On the Welcome page of the wizard, specify:
    Option Description
    Select a resource for which the sequence generator will be created Select a resource from the list.
    What do you want to name the new sequence generator? Enter a unique name for the new sequence generator; maximum of 128 characters.
    Which user do you want to own the sequence generator? From the list, select the user designated as the owner of the sequence generator.
  5. Click Next.
  6. On the Values page, specify:
    Option Description
    What is the minimum value for this sequence generator? Enter the minimum value for the sequence generator. Default value is 1. Valid range is -9223372036854775808 to 9223372036854775807.
    What is the maximum value for this sequence generator? Enter the maximum value for the sequence generator. Default value is 9223372036854775807. Valid range is -9223372036854775808 to 9223372036854775807.
  7. Click Next.
  8. On the Increment page, specify:
    Option Description
    What is the start value for this sequence generator? Enter the start value for the sequence generator. Default value is 1. Valid range is -9223372036854775808 to 9223372036854775807.
    What is the increment value for this sequence generator? Enter the incremental value for the sequence generator. Default value is 1. Valid range is -9223372036854775808 to 9223372036854775807.
  9. Click Next.
  10. On the Options page, specify:
    Option Description
    Cycle values (Optional) Select if the sequence generator is to continue generating values [starting over at the start value] once minimum or maximum values have been reached. Option unselected by default.
    Cache size Enter a cache size. The cache size determines the number of preallocated sequence values that are kept in memory for faster access. When the cache is exhausted, it is repopulated and a corresponding entry is written to the transaction log. Default value is 100. Valid range is 0 to unlimited.
  11. Click Next.
  12. (Optional) On the Comment page, specify a comment for the sequence generator.
  13. Click Finish to create the sequence generator as defined.
Related tasks
Deleting a Sequence Generator
Restarting a Sequence at Start Value
Generating Sequence Generator DDL Command
Viewing or Modifying Sequence Generator Properties
Granting Sequence Generator USAGE Permission
Revoking Sequence Generator USAGE Permission
Authenticating a Login Account for a Managed Resource
Related reference
Sequence Generator Privilege Summary