This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # discover what programs are still connected to a db | |
| select sid,serial#,program from v$session where username = '<your_schema>'; | |
| # and forcibly disconnect them | |
| select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v$session where username = '<your_schema>' | |
| #Shutdown and restart cdb and pdb | |
| shutdown; | |
| #then | |
| startup; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| split_path = path.split('/') | |
| split_path.each_with_index.map do | _, index | | |
| # Reconstruct each path that makes up the target path and ensure they are created | |
| partial_path = ::File.join split_path.slice(0, index + 1) | |
| next if partial_path == '' | |
| directory partial_path do | |
| owner node[:oracle][:database][:install_user] | |
| group node[:oracle][:database][:install_group] | |
| mode 0775 | |
| end |
NewerOlder