Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1524429

Summary: oracle: alter user syntax wrong
Product: Red Hat Enterprise Linux 7 Reporter: Giuseppe Mancuso <peppo.work>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.4-AltCC: agk, cluster-maint, fdinitto, mlisik, peppo.work
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: resource-agents-3.9.5-125.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 11:39:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Giuseppe Mancuso 2017-12-11 13:40:00 UTC
Description of problem:
In the oracle resource script I found a error on syntax for alter user.

set_mon_user_profile() {
 	echo "alter user "$MONUSR" profile '$MONPROFILE';"
  }

Version-Release number of selected component (if applicable):


How reproducible:
The first run works fine (creation of resources via pcs), but when I modify the users on oracle, es. restore or migration databases data, the script want to modify the profile for monuser but not work and this is the error:

 ERROR: sqlplus output: alter user MONRHCS profile 'OCFMONPROFILE'#12*#012ERRORE alla riga 1:#012ORA-00931: identificativo mancante( DEFAULT )

Steps to Reproduce:
1. Create a resource: pcs resource create oracle-rdbms ocf:heartbeat:oracle sid=MYSID home=/home/oracle/product/12.2.0/db_1 user=oracle monuser=monrhcs monpassword=Password monprofile=OCFMONPROFILE shutdown_method=immediate 
2. Override your database
3. Try to start oracle and verify if you have the error

Steps to verify on oracle db:
1. sqlplus / as sysdba
2. startup
3. select PROFILE from dba_users where username='MONRHCS'; --> chek if is DEFAULT
4. desc dba_profiles --> check if the profile exist
5. alter user MONRHCS profile 'OCFMONPROFILE'; --> try the alter user from script
alter user MONRHCS profile 'OCFMONPROFILE'
                           *
ERRORE alla riga 1:
ORA-00931: identificativo mancante


Actual results:
Oracle not start.

Expected results:
Oracle start.

Additional info:
Fix is already done on github
https://github.com/ClusterLabs/resource-agents/commit/4b85ac93db86c03256b8679e36bb5eb50f86ca57

Comment 2 Oyvind Albrigtsen 2018-01-17 13:38:55 UTC
Tested patch and verified that it fixes the issue.

Comment 7 errata-xmlrpc 2018-10-30 11:39:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3278