Update: I will give this presentation at UKOUG Tech15, Wed 9 December at 14:30.
This presentation has had a very poor score in selections for conferences (no OOW, no DOAG) but people liked it very much at Paris Oracle Meetup. The Database on ACFS is mainstream now, thanks to the new ODA releases. Having some knowledge about why and how you should run (not) Databases on ACFS is definitely worth a read.
Slides
Demo 1 recording
Demo 2 recording
Demo script (DB ACFS clone from Standby Database)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
#!/bin/bash #################### # create the clone # #################### set -x NUM=`echo $$ | cut -c 1-4` export NEWNAME=${1:-SN$NUM} cat <<EOF ################################################ ################################################ ## ## CLONING DATABASE USING NEW SID: $NEWNAME ## ################################################ ################################################ EOF export ORACLE_SID=ACFSDB_1 dgmgrl <<EOF connect sys/racattack edit database ACFSDB set state="APPLY-OFF"; exit EOF acfsutil snap create -w $NEWNAME /u02 dgmgrl <<EOF connect sys/racattack edit database ACFSDB set state="APPLY-ON"; exit EOF cd /u02/.ACFS/snaps/$NEWNAME/ACFSDB sqlplus / as sysdba <<EOF alter database backup controlfile to trace as '/u02/.ACFS/snaps/$NEWNAME/ACFSDB/control.trc' reuse resetlogs; create pfile='/u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora' from spfile; exit EOF sed -i -e "s/u02\/ACFSDB\//u02\/.ACFS\/snaps\/$NEWNAME\/ACFSDB\//g" /u02/.ACFS/snaps/$NEWNAME/ACFSDB/control.trc sed -i -e "s/CREATE CONTROLFILE.*$/CREATE CONTROLFILE REUSE SET DATABASE \"$NEWNAME\" RESETLOGS FORCE LOGGING NOARCHIVELOG/" /u02/.ACFS/snaps/$NEWNAME/ACFSDB/control.trc rm /u02/.ACFS/snaps/$NEWNAME/ACFSDB/ACFSDB/fast_recovery_area/ACFSDB/controlfile/* rm /u02/.ACFS/snaps/$NEWNAME/ACFSDB/ACFSDB/controlfile/* sed -i '/^ACFS.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i -e "s/u02\/ACFSDB\//u02\/.ACFS\/snaps\/$NEWNAME\/ACFSDB\//g" /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.db_name.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.db_unique_name.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.dispatchers.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.audit_file_dest.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.fal_server.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.log_archive_config.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.log_archive_dest_1.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.memory_target.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.service_names.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora sed -i '/^\*\.cluster_database.*$/d' /u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora #find /u02/.ACFS/snaps/SNAP1/ACFSDB/ACFSDB/fast_recovery_area/ACFSDB/archivelog/ -type f -exec mv {} /u02/.ACFS/snaps/SNAP1/ACFSDB/archivelog/ \; mkdir -p $ORACLE_BASE/admin/$NEWNAME/adump cat >>/u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora <<EOF *.audit_file_dest='$ORACLE_BASE/admin/$NEWNAME/adump' *.db_name='$NEWNAME' *.db_unique_name='$NEWNAME' *.dispatchers='(PROTOCOL=TCP) (SERVICE=${NEWNAME}XDB)' *.log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST' *.sga_target=1900M $NEWNAME.instance_number=1 $NEWNAME.undo_tablespace=UNDOTBS1 *.service_names='$NEWNAME' *.cluster_database=false EOF export ORACLE_SID=$NEWNAME head -n $((`grep -n ^RECOVER /u02/.ACFS/snaps/$NEWNAME/ACFSDB/control.trc | awk -F: '{print $1}'`-2)) /u02/.ACFS/snaps/$NEWNAME/ACFSDB/control.trc > /u02/.ACFS/snaps/$NEWNAME/ACFSDB/control1.trc sqlplus / as sysdba <<EOF create spfile from pfile='/u02/.ACFS/snaps/$NEWNAME/ACFSDB/init$NEWNAME.ora'; @/u02/.ACFS/snaps/$NEWNAME/ACFSDB/control1.trc --recover automatic database using backup controlfile until cancel; --CANCEL alter database open resetlogs; alter tablespace temp add tempfile size 50M ; EOF |
Comments are, as always, very appreciated 🙂
—
Ludo
The following two tabs change content below.
Latest posts by Ludovico (see all)
- New views in Oracle Data Guard 23c - January 3, 2024
- New in Data Guard 21c and 23c: Automatic preparation of the primary - December 22, 2023
- Does FLASHBACK QUERY work across incarnations or after a Data Guard failover? - December 13, 2023
Hi, is there any view that’s present to identify (by running a SQL) whether the data files are residing on ACFS or in normal file system?
Hi Andy. No, as far as I know…
Hi, I try used the script (DB ACFS clone from Standby Database) but when I open , my dataguard is broker . existe more steps?
Do we need to setup second server as cold failover?
As per Oracle support,
The main problem is datafiles can’t be stored on ACFS as single instance scenarios can’t mount ACFS automatically on GI startup.
When I try to make data file location on ACFS, it gave error.
It has allowed software home on ACFS. I was working single server with GI option a install on standalone server.
Hi Tram,
you have to install GI for a Cluster, and then select the only node that you have (-> run the cluster on one node only).
GI Installation for standalone servers is Oracle Restart and it doesn’t work for datafiles on ACFS, as you correctly say.
Cheers
—
Ludo
Datafiles on ACFS does not support cluster in standalone server. Does it mean that it needs RAC license to utilize these features?
Hi Tram,
I think you refer to slide 14? Datafiles on ACFS can be used on standalone servers, the only constraint is that you cannot install Oracle Restart but you need to do a full Grid Infrastructure installation, this is a requirement for ACFS mount points managed by the cluster and not by the mountd daemon. Do not confuse Grid Infrastructure with Real Application Clusters: if you do not install the RDBMS for RAC you do not have to license any additional option. Grid Infrastructure is fine for single instance databases and cold failover clusters that do not require the RAC option.
I hope this clarifies your question!
Best regards
—
Ludo
Pingback: Oracle Database on ACFS: a perfect marriage? - Ludovico Caldara - Blogs - triBLOG