Thursday, 16 April 2020

Script To Set Newname For Datafiles Restore

-- Source Server --

set head off pages 0 feed off echo off verify off
set lines 200
spool rename_datafiles.sql
select 'set newname for datafile ' || file_id || ' to ''/san/data/' ||
substr(file_name,instr(file_name,'/',-1)+1) || ''';'
from dba_data_files ;
spool off

-- on Target Server --
sqlplus "/as sysdba"
set head off pages 0 feed off echo off verify off
set lines 200
spool rename_datafiles.sql
select 'set newname for datafile ' || file# || ' to ''/san/data/' ||
substr(name,instr(name,'/',-1)+1) || ''';'
from v$datafile ;
spool off

Wednesday, 15 April 2020

OCI network connectivity options

Scenario
Solution
Let instances connect to the Internet, and receive connections from it
Internet Gateway
Let instances reach the Internet without receiving connections from it
NAT Gateway
Let VCN hosts privately connect to object storage, bypassing the internet
Service Gateway
Make an OCI extend an on-premise network, with easy connectivity in both directions
IPsec VPN FastConnect
Privately connect two VCNs in a region
Local Peering Gateway
Privately connect two VCNs in different regions
Remote Peering Connection (DRG)