Skip to content

Commit

Permalink
Add support for autostart pluggable database
Browse files Browse the repository at this point in the history
  • Loading branch information
cvezalis committed Dec 29, 2015
1 parent c0e44ed commit dc6a6a9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions roles/oracle-install/files/start-pluggable-dbs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

. /home/oracle/.bashrc

sqlplus / as sysdba << EOF
CREATE OR REPLACE TRIGGER startup_pluggable_dbs
AFTER STARTUP ON DATABASE
BEGIN
EXECUTE IMMEDIATE 'alter pluggable database all open';
END;
/
EOF
11 changes: 10 additions & 1 deletion roles/oracle-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,13 @@
# sudo_user: '{{ host_username }}'
# ignore_errors: yes
# tags:
# - reboot-vagrant
# - reboot-vagrant

- name: Create trigger for autostart pluggable db's
copy: src=start-pluggable-dbs.sh dest={{ installation_folder }}/ mode=755
tags:
- start-pluggable

- shell: '{{ installation_folder }}/start-pluggable-dbs.sh'
tags:
- start-pluggable

0 comments on commit dc6a6a9

Please sign in to comment.