generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
amacdonal
committed
Dec 11, 2024
1 parent
4c63367
commit 4e58dab
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...ashback_data_archive/oracle_flashback_data_archive/files/check_if_index_cluster_exists.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
. ~/.bash_profile | ||
|
||
sqlplus -s / as sysdba <<EOF | ||
SET LINES 1000 | ||
SET PAGES 0 | ||
SET FEEDBACK OFF | ||
SET HEADING OFF | ||
WHENEVER SQLERROR EXIT FAILURE | ||
select cluster_name | ||
from dba_tables | ||
where table_name = 'SMON_SCN_TIME'; | ||
EXIT | ||
EOF |
42 changes: 42 additions & 0 deletions
42
...lashback_data_archive/oracle_flashback_data_archive/files/recreate_smon_scn_time_table.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# Source oracle bash profile | ||
. ~/.bash_profile | ||
|
||
# Shutdown the database | ||
srvctl stop database -d $ORACLE_SID | ||
|
||
# Start the database in upgrade mode | ||
srvctl start database -d $ORACLE_SID -o upgrade | ||
|
||
# Wait for 60 seconds | ||
sleep 60 | ||
|
||
# Modify the table and indexes | ||
sqlplus -s / as sysdba <<EOF | ||
SET LINESIZE 1000 | ||
SET PAGESIZE 0 | ||
SET FEEDBACK OFF | ||
SET HEADING OFF | ||
WHENEVER SQLERROR EXIT FAILURE | ||
rename smon_scn_time to smon_scn_time_org; | ||
create table smon_scn_time tablespace sysaux as select * from smon_scn_time_org; | ||
drop index smon_scn_time_tim_idx; | ||
create unique index smon_scn_time_tim_idx on smon_scn_time(time_mp) tablespace SYSAUX; | ||
drop index smon_scn_time_scn_idx; | ||
create unique index smon_scn_time_scn_idx on smon_scn_time(scn) tablespace SYSAUX; | ||
exit | ||
EOF | ||
|
||
# Shutdown the database | ||
srvctl stop database -d $ORACLE_SID | ||
|
||
# Start the database | ||
srvctl start database -d $ORACLE_SID |
9 changes: 9 additions & 0 deletions
9
playbooks/oracle_flashback_data_archive/oracle_flashback_data_archive/tasks/main.yml
This file contains 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
Empty file.