Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed with post script for pdb #183

Open
Nellynator opened this issue Jan 19, 2023 · 0 comments
Open

Help needed with post script for pdb #183

Nellynator opened this issue Jan 19, 2023 · 0 comments

Comments

@Nellynator
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant