Information
Limited support BMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see BMC AMI Catalog Manager for Db2 13.1.

Copying user ID privileges


This procedure describes how to copy privileges from a source user ID to one or more target user IDs. You can copy all privileges or only specific privileges.

  1. Create a list of user IDs that contains the source user ID, the one from which you want to copy authorizations.For information, see Generating-lists-in-Catalog-Manager.
  2. In the User Authorizations List panel, enter COPYAUTHS in the Cmd column beside the source user ID.
  3. (optional) If the target user IDs are included on the list of user IDs, enter the equal sign ( = ) in the Cmd column beside them.
  4. Press Enter.The Copy User Authorizations panel is displayed:

                            Copy User Authorizations                  1 to 19 of 19
    Command ===>                                                  Scroll ===> PAGE

    Generate copyauth grant SQL. . . N       Y to generate SQL
    Include implicit privileges. . . N       Y to include implicit privileges
    Privilege type to include. . . .         UA/RA/DA/TA/PA/GA/FA/SA/blank=all

    -------------------------------------------------------------------------------
    Copy From. . . QZU

    Swap with
    Copy From      Copy To
    N
    N
    N
    N
    N
    N
    N
    N
    N
    N
    Warning

    Note

    The Copy To field identifies the user IDs that were selected as the targets for the authorizations in Step 3. If you did not include target user IDs, then the Copy To field is blank.

  5. In the Copy To field, type the target user IDs. You can specify up to 10 user IDs.
  6. (optional) To identify a different source user ID, complete the following steps:
    1. In the Copy From field, type the new source user ID.
    2. In the Copy To field, type the target user IDs.
    3. In the Swap with Copy From field, type Y beside the user ID that you now want to use as the source:
      • If Y is indicated in the Swap with Copy From field for an object in the Copy To column, then that object becomes the source of the authorizations for all of the objects including the object in the Copy From field.
      • If Y is indicated in the Swap with Copy From field for more than one object in the Copy To column, then only the last object marked as such becomes the source object. All other objects, including others marked with a Y, are treated as target objects.
  7. In the Include implicit privileges field, enter Y to grant implicit privileges from the source user ID to the target user IDs.
  8. In the Privilege type to include field, enter the code of the object type for which you want to copy authorizations.
  9. In the Generate copyauth grant SQL field, enter Y to generate SQL and press Enter.The Confirm SQL panel is displayed:

    DEFF-R                         Confirm SQL                          1 to 5 of 5
    Command ===>                                                  Scroll ===> PAGE  

    Current SQLID. . . . . . . .  MVSSXS2                                          
    Edit Options . . . . . . . .  N         Y/N Modify SQL processing options      
    Edit SQL . . . . . . . . . .  N         Y/N Edit SQL before executing          
    Save in SQL table. . . . . .  N         A/Y/R/N A/Y-Append, R-Replace          
     Name of saved data. . . . .  20220222_094815                                  
    Save in PDS. . . . . . . . .  N         Y/N Save in PDS                        
     PDS(member) . . . . . . . .  ACT.V12.DATABASE(TEST)                           
                                                                                  
    Execute SQL. . . . . . . . .  N         Remote Db2 . NONE      Enter ? for list
    -------------------------------------  SQL  -----------------------------------
       GRANT DBADM
          ON DATABASE
             QZUDSC30
          TO RDACRJ ;

    ******************************* Bottom of data ********************************
  10. On the Confirm SQL panel, you can edit and save the SQL and then execute it:
    1. (Optional) From the Command line, issue the SET sqlid command to change the value of the current SQLID.

      Warning

      Note

      The ID shown in the Current SQLID field must have the proper authority to perform the specified SQL GRANT statement. If you hold a primary- or secondary-authorization ID that has the proper authority, you can change the Current SQLID to that authorization ID and complete the CREATE. To change the Current SQLID, use the SET command.

    2. (Optional) In the Edit options field, enter Y to modify the default values for the options on the Confirm SQL panel and then press Enter.The Options panel is displayed. In the Edit SQL and Confirm options field, type Y to display the options for the Confirm SQL panel. Press END to return to the Confirm SQL panel.
    3. (Optional) In the Edit SQL field, enter Y to invoke an ISPF edit session to edit the SQL and then press Enter.Press END to save the SQL and return to the Confirm SQL panel.
    4. (Optional) In the Save in SQL table field, enter A, Y, R, or N to specify whether to save the SQL in the Catalog Manager SQL_Table.

      Purpose

      Action

      Append the SQL to the SQL in the SQL_Table

      Enter A

      Save the SQL in the SQL_Table

      Enter Y

      Replace the SQL in the SQL_Table

      Enter R

      Discard the SQL

      Enter N

    5. (Optional) In the Name of saved SQL field, type a name for the SQL.
    6. (Optional) In the Save in PDS field, type Y to save the SQL in a member of a partitioned data set (PDS).The saved SQL uses the ID displayed in the Current SQLID field as the object qualifier. If the SQL is not saved, the ID in the Current SQLID is used only to identify DB2 authority.
    7. (Optional) In the PDS(member) field, type the name of the PDS and member.To import the PDS member to another subsystem as an entry in the SQL_Table, see Importing-the-SQL-in-another-subsystem.
    8. (BMC.DB2.SPE2210)

       (Optional) In the Remote Db2 field, perform one of the following steps to execute the SQL displayed on a different Db2 subsystem:

      • Enter a Db2 subsystem ID.
      • To select a Db2 subsystem from a list, type ? and then press Enter.
    9. (Optional) In the Execute SQL field, enter Y to execute the SQL displayed on the Confirm SQL panel and then press Enter.The SQL Progress Indicator panel is displayed. The panel automatically refreshes to display the status of the SQL that is being executed.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Catalog Manager for Db2 12.1