Forum Stats

  • 3,855,322 Users
  • 2,264,499 Discussions
  • 7,905,968 Comments

Discussions

Export Privileges and Security in Discoverer

GuilleTil
GuilleTil Member Posts: 1
edited Sep 16, 2008 2:48PM in Discoverer
Hello: I grant privileges to users Discoverer in test instance. For example grant "Schedule Workbooks"
I wish to export this (script) and then import to production instance.

It is possible??

Thanks,

Guillermo A.-

Answers

  • Hi Guillermo
    This is not possible. These settings are unique from server to server and there is no mechanism for copying them between servers.

    Best wishes
    Michael
  • Rod West
    Rod West Member Posts: 4,025 Gold Trophy
    Hi,

    You cannot export the privileges directly but you can use the SQL below to extract all the privileges for users. You can adapt it so that it just extracts the schedule workbook privileges formats these into a set of import commands that you can run on another environment.

    SELECT DECODE (o107400.app_name_mn,
    2300, 'User Edition',
    2301, ' Create/Edit Query',
    2302, ' Item Drill',
    2303, ' Drill Out',
    2304, ' Grant Workbook',
    2305, ' Collect Query Statistics',
    2306, 'Administration',
    2307, ' Set Privilege',
    2308, ' Create/Edit Business Area',
    2309, ' Format Business Area',
    2310, ' Create Summaries',
    2311, ' Query Statistics Minimum Cost',
    2312, ' Schedule Workbooks',
    2313, 'Scheduled Workbooks Tab'
    || CHR (10)
    || ' Run Queries Online',
    2314, ' Save Workbooks to Database',
    2315, ' Manage Scheduled Workbooks',
    2318, ' Change Password',
    NULL, NULL,
    'Unknown Privlege'
    ) privs,
    DECODE (o107413.eu_role_flag, 1, 'Role/Responsibilty', 'User') user_type,
    DECODE
    (eul_us.eul5_get_isitapps_eul,
    1, DECODE
    (o107413.eu_role_flag,
    1, eul_us.eul5_get_apps_userresp
    (o107413.eu_username,
    'R'
    ),
    eul_us.eul5_get_apps_userresp (o107413.eu_username)
    ),
    o107413.eu_username
    ) username
    FROM eul_us.eul5_access_privs o107386,
    eul_us.eul5_app_params o107400,
    eul_us.eul5_eul_users o107413
    WHERE ((o107400.app_id = o107386.gp_app_id) AND (o107413.eu_id(+) =
    o107386.ap_eu_id))
    AND (o107386.gba_ba_id IS NULL)
    ORDER BY DECODE (o107413.eu_role_flag, 1, 'Role/Responsibilty', 'User') ASC,
    DECODE
    (eul_us.eul5_get_isitapps_eul,
    1, DECODE
    (o107413.eu_role_flag,
    1, eul_us.eul5_get_apps_userresp
    (o107413.eu_username,
    'R'
    ),
    eul_us.eul5_get_apps_userresp (o107413.eu_username)
    ),
    o107413.eu_username
    ) ASC

    Rod West
  • Michael Armstrong-Smith
    Michael Armstrong-Smith Member Posts: 4,403
    edited Sep 16, 2008 2:48PM
    Hi Rod
    The script you provided is great and workd fine within an Apps database. However, it doesn't run within a standard EUL as it makes reference to objects that only get installed when running the EUL5_APPS script. For example: eul5_get_apps_userresp

    I hope you don't mind but I took your code and reworked it for a standard EUL:

    I also added a new privilege, 2324 which is the privilege to Create a Link in Plus.

    SELECT
    USERS.EU_USERNAME,
    PARAMS.APP_NAME_MN,
    DECODE (PARAMS.APP_NAME_MN,
    2300, 'User Edition',
    2301, ' Create/Edit Query',
    2302, ' Item Drill',
    2303, ' Drill Out',
    2304, ' Grant Workbook',
    2305, ' Collect Query Statistics',
    2306, 'Administration',
    2307, ' Set Privilege',
    2308, ' Create/Edit Business Area',
    2309, ' Format Business Area',
    2310, ' Create Summaries',
    2311, ' Query Statistics Minimum Cost',
    2312, ' Schedule Workbooks',
    2313, 'Scheduled Workbooks Tab - Run Queries Online',
    2314, ' Save Workbooks to Database',
    2315, ' Manage Scheduled Workbooks',
    2318, ' Change Password',
    2324, 'Create Link',
    NULL, NULL,
    'Unknown Privlege'
    ) PRIVS
    FROM EUL5_ACCESS_PRIVS PRIVS,
    EUL5_APP_PARAMS PARAMS,
    EUL5_EUL_USERS USERS
    WHERE ((PARAMS.APP_ID = PRIVS.GP_APP_ID) AND (USERS.EU_ID(+) =
    PRIVS.AP_EU_ID))
    AND (PRIVS.GBA_BA_ID IS NULL)
    ORDER BY 1,2;

    Between these two scripts anyone should be able to read all of the privileges in both standard and Apps mode EULs.

    Best wishes
    Michael
This discussion has been closed.