rem Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. rem rem This script can be used to export owb users from a specific workspace and rem generate the user creation script for them. rem The generated script will use the username as the default password. rem rem USAGE rem 1. connect(e.g. in SQL*Plus) to database using workspace owner, rem then run this script. rem rem @/owb/reposasst/export_workspace_users.sql rem rem 2. The script will prompt you to input rem a. "output file name" you should input the absolute path of rem the output file. rem b. "workspace name" you should specify the workapce which you rem want to export. Note: the workspace name rem is case-sensitive. rem rem 3. The script will display "Export complete!" if the whole export process rem finishes. rem rem EXAMPLE rem There is a workspace named wks1, and owner is wksowner. There are 4 users rem in this workspace: wksuser1,wksuser2,wksuser3,wksuser4. Use following steps rem to export the users in this workspace. rem rem 1. Connect to database using wksowner. rem 2. Run @/owb/reposasst/export_workspace_users.sql rem 3. Input "/tmp/userlist.sql" when script prompts to input output file. rem 4. Input "wks1" when script prompts to input workspace name. rem 5. After the script displays "Export complete!", check the output file rem "/tmp/userlist.sql" and you see the following lines: rem rem create user wksowner identified by wksowner; rem create user wksuser1 identified by wksuser1; rem create user wksuser2 identified by wksuser2; rem create user wksuser3 identified by wksuser3; rem create user wksuser4 identified by wksuser4; rem 6. Use "/tmp/userlist.sql" to create users in target repository when perform rem the repository migration. rem Users should modify the script and provide passwords. prompt Enter path for scripting output file: set termout off define file_name = &1 set termout on prompt Enter workspace name(Case-sensitive): set termout off define workspace_name = &2 set echo off set heading off set role owb_user; call owbsys.wb_workspace_management.export_workspace_user('&workspace_name'); spool &file_name select * from owbsys.export_user_table; spool off set termout on prompt Export complete!