@ z:\y_drive\mpowered\product\Operations\db-machine\oracle_find_all_privs-mcw.sql
GRANTS:
GRANT INSERT ON CD_CHECKLISTS TO MPOWEREDWEB;
GRANT SELECT ON CD_CHECKLISTS TO MPOWEREDWEB;
GRANT UPDATE ON CD_CHECKLISTS TO MPOWEREDWEB;
GRANT SELECT ON CD_CHECKLIST_ITEMS TO MPOWEREDWEB;
GRANT SELECT ON CD_CONDITIONS TO MPOWEREDWEB;
GRANT SELECT ON CD_CONDITION_CODES TO MPOWEREDWEB;
GRANT INSERT ON CD_DOC_IMAGES TO MPOWEREDWEB;
GRANT SELECT ON CD_DOC_IMAGES TO MPOWEREDWEB;
GRANT SELECT ON CD_FOLDERS TO MPOWEREDWEB;
GRANT UPDATE ON CD_FOLDERS TO MPOWEREDWEB;
GRANT SELECT ON CD_FOLDER_CATEGORIES TO MPOWEREDWEB;
GRANT SELECT ON CD_FOLDER_STATUS TO MPOWEREDWEB;
GRANT SELECT ON CD_FOLDER_TYPES TO MPOWEREDWEB;
GRANT SELECT ON CD_INSP_CODES TO MPOWEREDWEB;
GRANT INSERT ON CD_INSP_COMMENTS TO MPOWEREDWEB;
GRANT SELECT ON CD_INSP_COMMENTS TO MPOWEREDWEB;
GRANT UPDATE ON CD_INSP_COMMENTS TO MPOWEREDWEB;
GRANT SELECT ON CD_PARAMETERS TO MPOWEREDWEB;
GRANT SELECT ON CD_PROJECTS TO MPOWEREDWEB;
GRANT SELECT ON CD_SETBACK_TRANSACTIONS TO MPOWEREDWEB;
GRANT SELECT ON CD_SETBACK_TYPES TO MPOWEREDWEB;
GRANT SELECT ON CD_SETBACK_TYPES_XREF TO MPOWEREDWEB;
GRANT SELECT ON CD_STAT_HOLIDAYS TO MPOWEREDWEB;
GRANT INSERT ON CD_TASKS TO MPOWEREDWEB;
GRANT SELECT ON CD_TASKS TO MPOWEREDWEB;
GRANT UPDATE ON CD_TASKS TO MPOWEREDWEB;
GRANT SELECT ON CD_TASK_FUNCTIONS TO MPOWEREDWEB;
GRANT SELECT ON CD_TASK_INSP_CODES TO MPOWEREDWEB;
GRANT SELECT ON CD_TASK_STATUS TO MPOWEREDWEB;
GRANT SELECT ON CD_TASK_TYPES TO MPOWEREDWEB;
GRANT INSERT ON CD_WORKFLOW TO MPOWEREDWEB;
GRANT SELECT ON CD_WORKFLOW TO MPOWEREDWEB;
GRANT SELECT ON CD_WORKFLOW_DESCRIPTIONS TO MPOWEREDWEB;
GRANT SELECT ON DS_ACCOUNTS TO MPOWEREDWEB;
GRANT SELECT ON DS_DEPOSITS TO MPOWEREDWEB;
GRANT SELECT ON DS_TRANSACTIONS TO MPOWEREDWEB;
GRANT SELECT ON LAND_LEGAL TO MPOWEREDWEB;
GRANT INSERT ON LAND_NOTES TO MPOWEREDWEB;
GRANT SELECT ON LAND_NOTES TO MPOWEREDWEB;
GRANT UPDATE ON LAND_NOTES TO MPOWEREDWEB;
GRANT SELECT ON LAND_NOTE_GROUPS TO MPOWEREDWEB;
GRANT SELECT ON LAND_PARAMETERS TO MPOWEREDWEB;
GRANT SELECT ON LAND_PHONE TO MPOWEREDWEB;
GRANT INSERT ON LAND_RELATION TO MPOWEREDWEB;
GRANT SELECT ON LAND_RELATION TO MPOWEREDWEB;
GRANT SELECT ON LAND_STD_NOTES TO MPOWEREDWEB;
GRANT SELECT ON LDV_OWNERS TO MPOWEREDWEB;
GRANT SELECT ON LAND_ATTRIBUTE TO MPOWEREDWEB;
GRANT SELECT ON LAND_ATTRIB_VALUES TO MPOWEREDWEB;
GRANT SELECT ON TD_ATTRIBUTES TO MPOWEREDWEB;
GRANT SELECT ON TD_ATTRIBUTE_TYPES TO MPOWEREDWEB;
GRANT SELECT ON TD_ATTRIBUTE_TYPE_VALUES TO MPOWEREDWEB;
GRANT EXECUTE ON TDGF_TL_SECURITY_CHECK TO MPOWEREDWEB;
GRANT EXECUTE ON TDGP_CD_EMAIL_MOBILE_INSP TO MPOWEREDWEB;
GRANT EXECUTE ON TDGP_CD_EMAIL_TSK_STATUS_CHNGD TO MPOWEREDWEB;
GRANT SELECT ON TEMPESTV_SECURITY TO MPOWEREDWEB;
GRANT SELECT ON TEMPESTV_SECURITY_ALL TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_CLIENT TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_EMAILS TO MPOWEREDWEB;
GRANT UPDATE ON TEMPEST_EMAILS TO MPOWEREDWEB;
GRANT DELETE ON TEMPEST_EMAILS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_EMAILS_RELATIONS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_EMAIL_TEMPLATE_TYPES TO MPOWEREDWEB;
GRANT INSERT ON TEMPEST_MODULE_ATTACHMENTS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_MODULE_ATTACHMENTS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_MODULE_ATTACH_EVENTS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_RELEASE_HEADER TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_RESOURCES TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_RESOURCE_CONTACT_DTLS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_SQLCODE TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_USER_TAGS TO MPOWEREDWEB;
GRANT SELECT ON TEMPEST_WORKGROUP_RESOURCES TO MPOWEREDWEB;
GRANT SELECT ON WC_CUSTOMERS TO MPOWEREDWEB;
GRANT SELECT ON WC_CUSTOMER_NOTES TO MPOWEREDWEB;
GRANT SELECT ON WC_CUSTOMER_USERS TO MPOWEREDWEB;

REVOKES:
REVOKE INSERT ON CD_CHECKLISTS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_CHECKLISTS FROM MPOWEREDWEB;
REVOKE UPDATE ON CD_CHECKLISTS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_CHECKLIST_ITEMS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_CONDITIONS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_CONDITION_CODES FROM MPOWEREDWEB;
REVOKE INSERT ON CD_DOC_IMAGES FROM MPOWEREDWEB;
REVOKE SELECT ON CD_DOC_IMAGES FROM MPOWEREDWEB;
REVOKE SELECT ON CD_FOLDERS FROM MPOWEREDWEB;
REVOKE UPDATE ON CD_FOLDERS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_FOLDER_CATEGORIES FROM MPOWEREDWEB;
REVOKE SELECT ON CD_FOLDER_STATUS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_FOLDER_TYPES FROM MPOWEREDWEB;
REVOKE SELECT ON CD_INSP_CODES FROM MPOWEREDWEB;
REVOKE INSERT ON CD_INSP_COMMENTS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_INSP_COMMENTS FROM MPOWEREDWEB;
REVOKE UPDATE ON CD_INSP_COMMENTS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_PARAMETERS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_PROJECTS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_SETBACK_TRANSACTIONS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_SETBACK_TYPES FROM MPOWEREDWEB;
REVOKE SELECT ON CD_SETBACK_TYPES_XREF FROM MPOWEREDWEB;
REVOKE SELECT ON CD_STAT_HOLIDAYS FROM MPOWEREDWEB;
REVOKE INSERT ON CD_TASKS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_TASKS FROM MPOWEREDWEB;
REVOKE UPDATE ON CD_TASKS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_TASK_FUNCTIONS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_TASK_INSP_CODES FROM MPOWEREDWEB;
REVOKE SELECT ON CD_TASK_STATUS FROM MPOWEREDWEB;
REVOKE SELECT ON CD_TASK_TYPES FROM MPOWEREDWEB;
REVOKE INSERT ON CD_WORKFLOW FROM MPOWEREDWEB;
REVOKE SELECT ON CD_WORKFLOW FROM MPOWEREDWEB;
REVOKE SELECT ON CD_WORKFLOW_DESCRIPTIONS FROM MPOWEREDWEB;
REVOKE SELECT ON DS_ACCOUNTS FROM MPOWEREDWEB;
REVOKE SELECT ON DS_DEPOSITS FROM MPOWEREDWEB;
REVOKE SELECT ON DS_TRANSACTIONS FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_LEGAL FROM MPOWEREDWEB;
REVOKE INSERT ON LAND_NOTES FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_NOTES FROM MPOWEREDWEB;
REVOKE UPDATE ON LAND_NOTES FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_NOTE_GROUPS FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_PARAMETERS FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_PHONE FROM MPOWEREDWEB;
REVOKE INSERT ON LAND_RELATION FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_RELATION FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_STD_NOTES FROM MPOWEREDWEB;
REVOKE SELECT ON LDV_OWNERS FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_ATTRIBUTE FROM MPOWEREDWEB;
REVOKE SELECT ON LAND_ATTRIB_VALUES FROM MPOWEREDWEB;
REVOKE SELECT ON TD_ATTRIBUTES FROM MPOWEREDWEB;
REVOKE SELECT ON TD_ATTRIBUTE_TYPES FROM MPOWEREDWEB;
REVOKE SELECT ON TD_ATTRIBUTE_TYPE_VALUES FROM MPOWEREDWEB;
REVOKE EXECUTE ON TDGF_TL_SECURITY_CHECK FROM MPOWEREDWEB;
REVOKE EXECUTE ON TDGP_CD_EMAIL_MOBILE_INSP FROM MPOWEREDWEB;
REVOKE EXECUTE ON TDGP_CD_EMAIL_TSK_STATUS_CHNGD FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPESTV_SECURITY FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPESTV_SECURITY_ALL FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_CLIENT FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_EMAILS FROM MPOWEREDWEB;
REVOKE UPDATE ON TEMPEST_EMAILS FROM MPOWEREDWEB;
REVOKE DELETE ON TEMPEST_EMAILS FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_EMAILS_RELATIONS TO MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_EMAIL_TEMPLATE_TYPES FROM MPOWEREDWEB;
REVOKE INSERT ON TEMPEST_MODULE_ATTACHMENTS FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_MODULE_ATTACHMENTS FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_MODULE_ATTACH_EVENTS TO MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_RELEASE_HEADER FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_RESOURCES FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_RESOURCE_CONTACT_DTLS FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_SQLCODE FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_USER_TAGS FROM MPOWEREDWEB;
REVOKE SELECT ON TEMPEST_WORKGROUP_RESOURCES FROM MPOWEREDWEB;
REVOKE SELECT ON WC_CUSTOMERS FROM MPOWEREDWEB;
REVOKE SELECT ON WC_CUSTOMER_NOTES FROM MPOWEREDWEB;
REVOKE SELECT ON WC_CUSTOMER_USERS FROM MPOWEREDWEB;

New for FP80003 (included above):
GRANT DELETE ON TEMPEST_EMAILS TO MPOWEREDWEB; // change 20180820
GRANT SELECT ON TEMPEST_EMAILS_RELATIONS TO MPOWEREDWEB; // change 20181008
GRANT SELECT ON TEMPEST_MODULE_ATTACH_EVENTS TO MPOWEREDWEB; // change 20181008


******************************************************************
** These grants are so ~runstress can do it's thing
******************************************************************
GRANT UPDATE ON WC_CUSTOMER_NOTES TO MPOWEREDWEB;
GRANT SELECT ON CD_PERSON_TYPES TO MPOWEREDWEB;
GRANT INSERT ON LAND_EQUITY TO MPOWEREDWEB;


******************************************************************
** Run these statements to change the attachments directory
******************************************************************

** ORACLE **;
** ATTACHMENTS;
select file_name from tempest_module_attachments;
select module, file_name, '\\VM130' || substr(file_name, 8) from tempest_module_attachments where file_name like '\\VM123%';
select module, file_name, '\\VM130' || substr(file_name, 8) from tempest_module_attachments where UPPER(file_name) like '\\VM1%' and  file_name not like '\\VM130%';
update tempest_module_attachments set file_name = '\\VM130' || substr(file_name, 8) where file_name like '\\VM123%';
update tempest_module_attachments set file_name = '\\VM130' || substr(file_name, 8) where file_name like '\\Vm117%';
** PROSPERO;
select file_location from cd_folder_types where file_location like '\\VM12%';
update cd_folder_types set file_location = '\\VM130\C_DRIVE\ATTACH\ORAXE\PROSPERO\';
** for SSA3;
update cd_folder_types set file_location = '\\VM130\C_DRIVE\ATTACH\SAA3\PROSPERO\';
;
** SQL SERVER **;
** ATTACHMENTS;
select file_name from tempest_module_attachments;
select module, file_name, '\\VM130' + substring(file_name, 8, 1000) from tempest_module_attachments where file_name like '\\VM123%';
update tempest_module_attachments set file_name = '\\VM130' + substring(file_name, 8, 1000) where file_name like '\\VM123%';
** SETTINGS;
select file_location from cd_folder_types where file_location like '\\VM12%';
update cd_folder_types set file_location = '\\VM130\C_DRIVE\ATTACH\SQL3\PROSPERO\';
;

