CREATE USER dms PASSWORD 'djw9281js' NOCREATEDB NOCREATEUSER;

GRANT SELECT, INSERT, UPDATE, DELETE ON active_sessions TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON archive_restoration_request TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON archiving_settings TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON archiving_type_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON browse_criteria TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON data_types TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON dependant_document_instance TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON dependant_document_template TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON discussion_comments TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON discussion_threads TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_archiving_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_fields TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_fields_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_subscriptions TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_text TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_transaction_types_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_transactions TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_type_fields_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON document_types_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON documents TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON folder_doctypes_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON folder_subscriptions TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON folders TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON folders_users_roles_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON groups_folders_approval_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON groups_folders_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON groups_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON groups_units_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON help TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON links TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON metadata_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON mime_types TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON news TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON organisations_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON roles TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON search_document_user_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON status_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON system_settings TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON time_period TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON time_unit_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON units_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON units_organisations_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON users TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON users_groups_link TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON web_documents TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON web_documents_status_lookup TO dms;
GRANT SELECT, INSERT, UPDATE, DELETE ON web_sites TO dms;

GRANT ALL PRIVILEGES ON zseq_active_sessions TO dms;
GRANT ALL PRIVILEGES ON zseq_archive_restoration_request TO dms;
GRANT ALL PRIVILEGES ON zseq_archiving_settings TO dms;
GRANT ALL PRIVILEGES ON zseq_archiving_type_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_browse_criteria TO dms;
GRANT ALL PRIVILEGES ON zseq_data_types TO dms;
GRANT ALL PRIVILEGES ON zseq_dependant_document_instance TO dms;
GRANT ALL PRIVILEGES ON zseq_dependant_document_template TO dms;
GRANT ALL PRIVILEGES ON zseq_discussion_comments TO dms;
GRANT ALL PRIVILEGES ON zseq_discussion_threads TO dms;
GRANT ALL PRIVILEGES ON zseq_document_archiving_link TO dms;
GRANT ALL PRIVILEGES ON zseq_document_fields TO dms;
GRANT ALL PRIVILEGES ON zseq_document_fields_link TO dms;
GRANT ALL PRIVILEGES ON zseq_document_link TO dms;
GRANT ALL PRIVILEGES ON zseq_document_subscriptions TO dms;
GRANT ALL PRIVILEGES ON zseq_document_text TO dms;
GRANT ALL PRIVILEGES ON zseq_document_transaction_types_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_document_transactions TO dms;
GRANT ALL PRIVILEGES ON zseq_document_type_fields_link TO dms;
GRANT ALL PRIVILEGES ON zseq_document_types_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_documents TO dms;
GRANT ALL PRIVILEGES ON zseq_folder_doctypes_link TO dms;
GRANT ALL PRIVILEGES ON zseq_folder_subscriptions TO dms;
GRANT ALL PRIVILEGES ON zseq_folders TO dms;
GRANT ALL PRIVILEGES ON zseq_folders_users_roles_link TO dms;
GRANT ALL PRIVILEGES ON zseq_groups_folders_approval_link TO dms;
GRANT ALL PRIVILEGES ON zseq_groups_folders_link TO dms;
GRANT ALL PRIVILEGES ON zseq_groups_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_groups_units_link TO dms;
GRANT ALL PRIVILEGES ON zseq_help TO dms;
GRANT ALL PRIVILEGES ON zseq_links TO dms;
GRANT ALL PRIVILEGES ON zseq_metadata_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_mime_types TO dms;
GRANT ALL PRIVILEGES ON zseq_news TO dms;
GRANT ALL PRIVILEGES ON zseq_organisations_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_roles TO dms;
GRANT ALL PRIVILEGES ON zseq_search_document_user_link TO dms;
GRANT ALL PRIVILEGES ON zseq_status_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_system_settings TO dms;
GRANT ALL PRIVILEGES ON zseq_time_period TO dms;
GRANT ALL PRIVILEGES ON zseq_time_unit_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_units_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_units_organisations_link TO dms;
GRANT ALL PRIVILEGES ON zseq_users TO dms;
GRANT ALL PRIVILEGES ON zseq_users_groups_link TO dms;
GRANT ALL PRIVILEGES ON zseq_web_documents TO dms;
GRANT ALL PRIVILEGES ON zseq_web_documents_status_lookup TO dms;
GRANT ALL PRIVILEGES ON zseq_web_sites TO dms;
