Skip to content

Commit bafdbe1

Browse files
Dba 783 (#448)
* Add password file when adding database to crs * Use bash shell * Sqlplus exit command * Instance not available if Oracle not available * Both tests needed
1 parent 7212cba commit bafdbe1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

playbooks/oracle_duplicate/dfi-schemas.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
- name: Set Database Instance Available Flag
1616
set_fact:
17-
instance_available: "{{ ('UNKNOWN' not in check_instance_role.stdout) }}"
17+
instance_available: "{{ ('UNKNOWN' not in check_instance_role.stdout) and ('ORA-01034' not in check_instance_role.stdout) }}"
1818

1919
- name: Export Only When Instance Is Available
2020
when: instance_available and action == 'export'

playbooks/oracle_duplicate/files/dfi_schemas.sh

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ACTION=${1}
99
if [ "${ACTION}" == "check" ]
1010
then
1111
sqlplus -s / as sysdba << EOF
12+
WHENEVER SQLERROR EXIT FAILURE
1213
SET ECHO OFF
1314
SET FEED OFF
1415
SET LINES 132

0 commit comments

Comments
 (0)