Skip to content

Help needed with post script for pdb #183

@Nellynator

Description

@Nellynator

I started using this module and so far it's been great but I'm having issues with making it work for getting the postscript running for pdbs.

Originally I've done it by shell and cmd:
cmd: |
{{ora_home}}/bin/sqlplus -S / as sysdba <<EOF
ALTER PLUGGABLE DATABASE {{ pdb_name }} OPEN READ WRITE;
ALTER PLUGGABLE DATABASE {{ pdb_name }} SAVE STATE;
alter session set container={{ pdb_name }};
@{{ home }}/dba/template/script/script_PDB_122_18_19.sql
EOF

My issue is to getting to run the same commands with this module since sql and sqlscript are mutually exclusive, I don't know how to get them to run together. Is anybody able to help me?

I have tried it with only sql:

  sql: |
    BEGIN 
      ALTER PLUGGABLE DATABASE {{ pdb_name }} OPEN READ WRITE;
      ALTER PLUGGABLE DATABASE {{ pdb_name }} SAVE STATE;
      alter session set container={{ pdb_name }};
      @{{ home }}/dba/template/script/script_PDB_122_18_19.sql
    END;
    /

as well as having them seperated which doesn't work since the script needs to run with the alter pluggable... commands

Any help would be appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions