CruGlobal / ansible-oracle-db-upgrade

Ansible Role to Upgrade Oracle Databases
7 stars 8 forks source link

"ORA-01034: ORACLE not available", "Process ID: 0" #4

Closed SudhireV closed 6 years ago

SudhireV commented 6 years ago

Hi Getting following error for RAC DB, this environment didn't have ORACLE_SID etc set , all are part of 12c_1_pre_upgrade.yml file.. what am I doing different here.


changed: [10.10.112.167] => {"changed": true, "cmd": "cat db_unique_name.log", "delta": "0:00:00.025194", "end": "2017-12-14 14:24:30.563766", "invocation": {"module_args": {"_raw_params": "cat db_unique_name.log", "_uses_shell": true, "chdir": "/u03/omcs/ansible_stage/12c_upgrade/TEMPDB", "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "rc": 0, "start": "2017-12-14 14:24:30.538572", "stderr": "", "stdout": "TEMPDB", "stdout_lines": ["TEMPDB"], "warnings": []} changed: [10.10.112.162] => {"changed": true, "cmd": "cat db_unique_name.log", "delta": "0:00:00.015577", "end": "2017-12-14 14:24:30.811786", "invocation": {"module_args": {"_raw_params": "cat db_unique_name.log", "_uses_shell": true, "chdir": "/u03/omcs/ansible_stage/12c_upgrade/TEMPDB", "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "rc": 0, "start": "2017-12-14 14:24:30.796209", "stderr": "", "stdout": "select trim(value) from v$parameter where name='db_unique_name'\n\nERROR at line 1:\nORA-01034: ORACLE not available\nProcess ID: 0\nSession ID: 0 Serial number: 0", "stdout_lines": ["select trim(value) from v$parameter where name='db_unique_name'", "", "ERROR at line 1:", "ORA-01034: ORACLE not available", "Process ID: 0", "Session ID: 0 Serial number: 0"], "warnings": []}

SudhireV commented 6 years ago

If I have put in TEMP1 in the instance name it's working fine for sqlplus and backups , playbook not recognising or using srvctl to poll instance information and run the commands on demand. could be - my configuration is not correct

SudhireV commented 6 years ago

Updated parameter oracle_install_type: EE to oracle_instance_type: rac

Have same outcome, session not getting established, I can set oracle_home, need a way to set ORACLE_SID property, one other parameter I am not sure of is master_node , I have tried to set IP address ,, instance_id, may be any other option to be set here

SudhireV commented 6 years ago

added alias host_num to ansible_hosts entry.

gopi18dba commented 4 years ago

hi Sudhire, can you pls give me complete details where to add and etc host_num to ansible_host.

TASK [oradb-upgrade : Run db_unique_name.sql] **** fatal: [servername : FAILED! => {"msg": "The field 'environment' has an invalid value, which includes an undefined variable. The error was: {u'PATH': u'{{ oracle_home_old }}/bin:{{ oracle_home_old }}/OPatch:$PATH:/bin:/usr/bin::/usr/ccs/bin', u'ORACLE_SID': u'{{ oracle_sid }}', u'TNS_ADMIN': u'{{ tns_admin }}', u'ORACLE_BASE': u'{{ oracle_base }}', u'ORACLE_HOME': u'{{ oracle_home_old }}'}: 'tns_admin' is undefined\n\nThe error appears to have been in '/uhcdba/upgrade/ansible-oracle-db-upgrade-master/roles/oradb-upgrade/tasks/get_uniqu

gopi18dba commented 4 years ago

oracle_sid: "{{ db_name }}{{ host_num |default('') }}" .. where we need to add this one..