Thursday, June 23, 2016

How to configure a batch file to make use of winscp to get files from remote server

I have a perl script scheduled in each databases box that will do the health-checks of my databases. Every morning it will generate a html file and I would like to fetch all those files in a single click into  my local machine  . How to do that ? As ftp is disabled in my database box , I have to rely on scp . I could able to fetch all the files by creating a batch file .

Note:-   Winscp is  required for this set up and it should be installed in your local machine. I have installed my WinScp software in "C:\Program Files (x86)\WinSCP" .

Create a batch file say for example
Get_files_using_winscp.bat  with following contents

@echo off

del "C:\Users\mahesh\Desktop\DB_HealthCheck\Report\*.html"
cd "C:\Program Files (x86)\WinSCP"
Winscp.com /script=C:\Users\mahesh\Desktop\DB_HealthCheck\get_my_files.txt
Exit 

And the contents of  get_my_files.txt is given below 

option echo off

option batch on

option confirm off

open sftp://oracle:Welcome123@10.18.211.8

lcd "C:\Users\mahesh\Desktop\DB_HealthCheck\Report"

cd  /home/oracle/HealthChecks/html/

get -nopermissions -nopreservetime DBHealthChecks_*


open sftp://oracle:Welcome123@10.18.214.9
lcd "C:\Users\mahesh\Desktop\DB_HealthCheck\Report"

cd  /home/oracle/HealthChecks/html/

get -nopermissions -nopreservetime DBHealthChecks_*

Double click the batch file you created and you will get your files in your local PC.

Enjoy :)

Tuesday, June 14, 2016

Creating a standby database in the same host and disk group from rman backup location


Today I come up with a requirement to create a standy database within the same host where my primary database is up and running . If you do a RMAN manual restore, there might be a chance for overwriting the source database.
 
So I relied on RMAN duplicate – In rman duplicate we can duplicate a standby database either by connecting to primary  database (Active standby database duplication ) or by taking rman backup from the source. 

DIREC –>  primary database
DRREC –>  standby database to create 

Here I took RMAN backup from the primary  

[oracle@exdb01]:[DIREC1] $ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jun 14 20:52:50 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: DIREC (DBID=1030724485)
RMAN>run
{
allocate channel d1 type disk;
allocate channel d2 type disk;
allocate channel d3 type disk;
allocate channel d4 type disk;
sql "alter system archive log current";
BACKUP AS COMPRESSED BACKUPSET FULL TAG 'DIREC_FULL' DATABASE format '/t4_nfs_2/DIREC_TEMP/Backup_%d_%T_%s' include current controlfile for standby;
sql "alter system archive log current";
backup archivelog all format '/t4_nfs_2/DIREC_TEMP/ARCHIVE_%d_%T_%s';
}

Create a init file for new stanby  

[oracle@exdb01]:[DRREC1] $ cat initDRREC1.ora
DRREC1.__data_transfer_cache_size=0
DRREC2.__db_cache_size=956301312
DRREC1.__db_cache_size=1207959552
DRREC2.__java_pool_size=67108864
DRREC1.__java_pool_size=67108864
DRREC2.__large_pool_size=83886080
DRREC1.__large_pool_size=520093696
DRREC2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DRREC1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DRREC2.__pga_aggregate_target=1493172224
DRREC1.__pga_aggregate_target=1493172224
DRREC2.__sga_target=2801795072
DRREC1.__sga_target=2801795072
DRREC2.__shared_io_pool_size=0
DRREC1.__shared_io_pool_size=117440512
DRREC2.__shared_pool_size=1660944384
DRREC1.__shared_pool_size=872415232
DRREC2.__streams_pool_size=0
DRREC1.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/DRREC/adump'
*.audit_trail='db'
*.cluster_database=false
*.compatible='12.1.0.2'
*.control_files='+ORADATA/DRREC/control01.ctl','+ORAFRA/DRREC/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='+ORADATA'
*.db_create_online_log_dest_1='+ORADATA'
*.db_create_online_log_dest_2='+ORAFRA'
*.db_name='DIREC'
*.db_unique_name='DRREC'
*.db_recovery_file_dest='+ORAFRA'
*.db_recovery_file_dest_size=107374182400
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DRRECXDB)'
DRREC1.instance_number=1
DRREC2.instance_number=2
*.memory_target=4G
*.nls_language='AMERICAN'
*.open_cursors=300
*.pga_aggregate_target=536870912
*.processes=500
*.remote_login_passwordfile='exclusive'
*.sga_target=1610612736
DRREC1.thread=1
DRREC2.thread=2
DRREC1.undo_tablespace='UNDOTBS1'
DRREC2.undo_tablespace='UNDOTBS2'
[oracle@exdb01]:[DRREC1] $

Start up standby database in nomount stage 

[oracle@exdb01]:[DRREC1] $ . oraenv
ORACLE_SID = [DRREC1] ? DRREC1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@exdb01]:[DRREC1] $ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 14 18:31:53 2016
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
tConnected to an idle instance.
SQL> startup nomount pfile='initDRREC1.ora';
ORACLE instance started.
Total System Global Area 4294967296 bytes
Fixed Size                  5291928 bytes
Variable Size            2717909096 bytes
Database Buffers         1560281088 bytes
Redo Buffers               11485184 bytes
SQL>
SQL> show parameter db_u
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_ultra_safe                        string      OFF
db_unique_name                       string      DRREC
db_unrecoverable_scn_tracking        boolean     TRUE
SQL> show parameter db_n
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_name                              string      DIREC
SQL> show parameter creeate
SQL> show parameter create
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
create_bitmap_area_size              integer     8388608
create_stored_outlines               string
db_create_file_dest                  string      +ORADATA
db_create_online_log_dest_1          string      +ORADATA
db_create_online_log_dest_2          string      +ORAFRA
db_create_online_log_dest_3          string
db_create_online_log_dest_4          string
db_create_online_log_dest_5          string
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Advanced Analytics
and Real Application Testing options
[oracle@exdb01]:[DRREC1] $

Connect to auxiliary instance and execute rman duplicate

[oracle@exdb01]:[DRREC1] $ rman auxiliary /
Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jun 14 18:33:01 2016 Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved. connected to auxiliary database: DIREC (not mounted)
RMAN> run
{
 allocate auxiliary channel stby1 type disk;
 allocate auxiliary channel stby2 type disk;
 allocate auxiliary channel stby3 type disk;
 DUPLICATE TARGET DATABASE FOR STANDBY DORECOVER BACKUP LOCATION '/t4_nfs_2/DIREC_TEMP';
}2> 3> 4> 5> 6> 7>
allocated channel: stby1
channel stby1: SID=497 device type=DISK
allocated channel: stby2
channel stby2: SID=530 device type=DISK
allocated channel: stby3
channel stby3: SID=563 device type=DISK
Starting Duplicate Db at 14-JUN-16
contents of Memory Script:
{
   restore clone standby controlfile from  '/t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_19';
}
executing Memory Script
Starting restore at 14-JUN-16
channel stby2: skipped, AUTOBACKUP already found
channel stby3: skipped, AUTOBACKUP already found
channel stby1: restoring control file
channel stby1: restore complete, elapsed time: 00:00:08
output file name=+ORADATA/DRREC/control01.ctl
output file name=+ORAFRA/DRREC/control02.ctl
Finished restore at 14-JUN-16
contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
   set until scn  130771368;
   set newname for clone tempfile  1 to new;
   switch clone tempfile all;
   set newname for clone datafile  1 to new;
   set newname for clone datafile  2 to new;
   set newname for clone datafile  3 to new;
   set newname for clone datafile  4 to new;
   set newname for clone datafile  5 to new;
   set newname for clone datafile  6 to new;
   set newname for clone datafile  7 to new;
   set newname for clone datafile  8 to new;
   restore
   clone database
   ;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
renamed tempfile 1 to +ORADATA in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 14-JUN-16
channel stby1: starting datafile backup set restore
channel stby1: specifying datafile(s) to restore from backup set
channel stby1: restoring datafile 00001 to +ORADATA
channel stby1: restoring datafile 00005 to +ORADATA
channel stby1: reading from backup piece /t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_18
channel stby2: starting datafile backup set restore
channel stby2: specifying datafile(s) to restore from backup set
channel stby2: restoring datafile 00002 to +ORADATA
channel stby2: restoring datafile 00006 to +ORADATA
channel stby2: reading from backup piece /t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_17
channel stby3: starting datafile backup set restore
channel stby3: specifying datafile(s) to restore from backup set
channel stby3: restoring datafile 00003 to +ORADATA
channel stby3: restoring datafile 00008 to +ORADATA
channel stby3: reading from backup piece /t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_16
channel stby3: piece handle=/t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_16 tag=DIREC_1406
channel stby3: restored backup piece 1
channel stby3: restore complete, elapsed time: 00:01:05
channel stby3: starting datafile backup set restore
channel stby3: specifying datafile(s) to restore from backup set
channel stby3: restoring datafile 00004 to +ORADATA
channel stby3: restoring datafile 00007 to +ORADATA
channel stby3: reading from backup piece /t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_15
channel stby3: piece handle=/t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_15 tag=DIREC_1406
channel stby3: restored backup piece 1
channel stby3: restore complete, elapsed time: 00:00:45
channel stby2: piece handle=/t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_17 tag=DIREC_1406
channel stby2: restored backup piece 1
channel stby2: restore complete, elapsed time: 00:02:00
channel stby1: piece handle=/t4_nfs_2/DIREC_TEMP/Backup_DIREC_20160614_18 tag=DIREC_1406
channel stby1: restored backup piece 1
channel stby1: restore complete, elapsed time: 00:02:10
Finished restore at 14-JUN-16
contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=9 STAMP=914524621 file name=+ORADATA/DRREC/DATAFILE/system.2663.914524493
datafile 2 switched to datafile copy
input datafile copy RECID=10 STAMP=914524621 file name=+ORADATA/DRREC/DATAFILE/sysaux.2668.914524493
datafile 3 switched to datafile copy
input datafile copy RECID=11 STAMP=914524621 file name=+ORADATA/DRREC/DATAFILE/undotbs1.2665.914524491
datafile 4 switched to datafile copy
input datafile copy RECID=12 STAMP=914524621 file name=+ORADATA/DRREC/DATAFILE/users.2670.914524557
datafile 5 switched to datafile copy
input datafile copy RECID=13 STAMP=914524621 file name=+ORADATA/DRREC/DATAFILE/orinon_ts.2667.914524493
datafile 6 switched to datafile copy
input datafile copy RECID=14 STAMP=914524621 file name=+ORADATA/DRREC/DATAFILE/oraion_ts.2669.914524493
datafile 7 switched to datafile copy
input datafile copy RECID=15 STAMP=914524622 file name=+ORADATA/DRREC/DATAFILE/tbs_test.2671.914524557
datafile 8 switched to datafile copy
input datafile copy RECID=16 STAMP=914524622 file name=+ORADATA/DRREC/DATAFILE/orion_data.2664.914524493
contents of Memory Script:
{
   set until scn  130771368;
   recover
   standby
   clone database
    delete archivelog
   ;
}
executing Memory Script
executing command: SET until clause
Starting recover at 14-JUN-16
starting media recovery
channel stby1: starting archived log restore to default destination
channel stby1: restoring archived log
archived log thread=1 sequence=223
channel stby1: reading from backup piece /t4_nfs_2/DIREC_TEMP/ARCHIVE_DIREC_20160614_22
channel stby2: starting archived log restore to default destination
channel stby2: restoring archived log
archived log thread=1 sequence=224
channel stby2: reading from backup piece /t4_nfs_2/DIREC_TEMP/ARCHIVE_DIREC_20160614_23
channel stby1: piece handle=/t4_nfs_2/DIREC_TEMP/ARCHIVE_DIREC_20160614_22 tag=TAG20160614T155349
channel stby1: restored backup piece 1
channel stby1: restore complete, elapsed time: 00:00:01
archived log file name=+ORAFRA/DRREC/ARCHIVELOG/2016_06_14/thread_1_seq_223.702.914524623 thread=1 sequence=223
channel clone_default: deleting archived log(s)
archived log file name=+ORAFRA/DRREC/ARCHIVELOG/2016_06_14/thread_1_seq_223.702.914524623 RECID=1 STAMP=914524623
channel stby2: piece handle=/t4_nfs_2/DIREC_TEMP/ARCHIVE_DIREC_20160614_23 tag=TAG20160614T155349
channel stby2: restored backup piece 1
channel stby2: restore complete, elapsed time: 00:00:02
archived log file name=+ORAFRA/DRREC/ARCHIVELOG/2016_06_14/thread_1_seq_224.5048.914524623 thread=1 sequence=224
channel clone_default: deleting archived log(s)
archived log file name=+ORAFRA/DRREC/ARCHIVELOG/2016_06_14/thread_1_seq_224.5048.914524623 RECID=2 STAMP=914524623
media recovery complete, elapsed time: 00:00:00
Finished recover at 14-JUN-16
Finished Duplicate Db at 14-JUN-16
released channel: stby1
released channel: stby2
released channel: stby3
RMAN>

Here we go .We successfully restored our standby database and all  files are created according to the OMF location that we specified within the init file. we can verify it .


SQL> select name from v$datafile ;

NAME
--------------------------------------------------------------------------------
+ORADATA/DRREC/DATAFILE/system.2663.914524493
+ORADATA/DRREC/DATAFILE/sysaux.2668.914524493
+ORADATA/DRREC/DATAFILE/undotbs1.2665.914524491
+ORADATA/DRREC/DATAFILE/users.2670.914524557
+ORADATA/DRREC/DATAFILE/orinon_ts.2667.914524493
+ORADATA/DRREC/DATAFILE/oraion_ts.2669.914524493
+ORADATA/DRREC/DATAFILE/tbs_test.2671.914524557
+ORADATA/DRREC/DATAFILE/orion_data.2664.914524493
SQL> select member from v$logfile ;

MEMBER
--------------------------------------------------------------------------------
+ORADATA/DRREC/ONLINELOG/group_3.2674.914524625
+ORAFRA/DRREC/ONLINELOG/group_3.2475.914524627
+ORADATA/DRREC/ONLINELOG/group_2.2673.914524625
+ORAFRA/DRREC/ONLINELOG/group_2.702.914524625
+ORADATA/DRREC/ONLINELOG/group_1.2672.914524625
+ORAFRA/DRREC/ONLINELOG/group_1.5048.914524625
+ORADATA/DRREC/ONLINELOG/group_7.2675.914524627
+ORAFRA/DRREC/ONLINELOG/group_7.4010.914524627
+ORADATA/DRREC/ONLINELOG/group_8.2676.914524627
+ORAFRA/DRREC/ONLINELOG/group_8.7990.914524627
+ORADATA/DRREC/ONLINELOG/group_9.2677.914524627
+ORAFRA/DRREC/ONLINELOG/group_9.7813.914524629
+ORADATA/DRREC/ONLINELOG/group_10.2678.914524629
+ORAFRA/DRREC/ONLINELOG/group_10.7223.914524629

SQL> select name from v$controlfile ;

NAME
--------------------------------------------------------------------------------
+ORADATA/DRREC/control01.ctl
+ORAFRA/DRREC/control02.ctl


Monday, June 13, 2016

ORA-00823: Specified value of sga_target greater than sga_max_size - How to solve this error in a cluster environment

I accidentally changed the values of sga_target with large value than the sga_max_size and did a shutdonw in one of the cluster database,

SQL> alter system set sga_target=3g scope=spfile;

System altered. 

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,OLAP, Advanced Analytics and Real Application Testing options


[oracle@exdb01trace]$ srvctl stop database -d GGOSB
while starting the database  up I encountered following error . 

[oracle@exdb01trace]$ srvctl start database -d GGOSB
PRCR-1079 : Failed to start resource ora.GGOSB.db
CRS-5017: The resource action "ora.GGOSB.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-00823: Specified value of sga_target greater than sga_max_size
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/exdb02/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.GGOSB.db' on 'exdb02' failed
CRS-5017: The resource action "ora.GGOSB.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-00823: Specified value of sga_target greater than sga_max_size
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/diag/crs/exdb01/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.GGOSB.db' on 'exdb01' failed
CRS-2632: There are no more servers to try to place resource 'ora.GGOSB.db' on that would satisfy its placement policy
[oracle@exdb01trace]$ 


I tried to recreate the pfile from spfile 

SQL> CREATE PFILE FROM SPFILE;
CREATE PFILE FROM SPFILE
*
ERROR at line 1:
ORA-01565: error in identifying file '?/dbs/spfile@.ora'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

SQL> create pfile='/tmp/initGGOSB1.ora' from memory;
create pfile='/tmp/initGGOSB1.ora' from memory
                                        *
ERROR at line 1:
ORA-00922: missing or invalid option


None of them worked as my spfile is stored in ASM ,  I spend some time on google  and I found following syntax creating the pfile as  expected.
SQL> create pfile='/tmp/initGGOSB1.ora' from spfile='+RECOC1/GGOSB/PARAMETERFILE/spfile.15366.905354331';

File created.

SQL> exit
Disconnected

[oracle@exdb01dbs]$ cat  /tmp/initGGOSB1.ora
GGOSB1.__data_transfer_cache_size=0
GGOSB2.__data_transfer_cache_size=0
GGOSB1.__db_cache_size=301989888
GGOSB2.__db_cache_size=318767104
GGOSB1.__java_pool_size=16777216
GGOSB2.__java_pool_size=16777216
GGOSB1.__large_pool_size=16777216
GGOSB2.__large_pool_size=16777216
GGOSB1.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
GGOSB2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
GGOSB1.__pga_aggregate_target=1073741824
GGOSB2.__pga_aggregate_target=1073741824
GGOSB1.__sga_target=2147483648
GGOSB2.__sga_target=2147483648
GGOSB1.__shared_io_pool_size=16777216
GGOSB2.__shared_io_pool_size=33554432
GGOSB1.__shared_pool_size=1728053248
GGOSB2.__shared_pool_size=1694498816
GGOSB1.__streams_pool_size=0
GGOSB2.__streams_pool_size=0
*._clusterwide_global_transactions=FALSE
*.audit_file_dest='/u01/app/oracle/admin/GGOSB/adump'
*.audit_trail='db'
*.cluster_database=TRUE
*.compatible='12.1.0.2.0'
*.control_file_record_keep_time=31
*.control_files='+DATAC1/GGOSB/CONTROLFILE/control1.ora','+RECOC1/GGOSB/CONTROLFILE/control2.ora'
*.db_block_size=8192
*.db_create_file_dest='+DATAC1'
*.db_create_online_log_dest_1='+DATAC1'
*.db_create_online_log_dest_2='+RECOC1'
*.db_domain=''
*.db_name='GGOSB'
*.db_recovery_file_dest='+RECOC1'
*.db_recovery_file_dest_size=536870912000
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=GGOSBXDB)'
*.enable_pluggable_database=false
GGOSB1.instance_number=1
GGOSB2.instance_number=2
*.open_cursors=300
*.parallel_min_servers=2
*.pga_aggregate_limit=1572864000
*.pga_aggregate_target=1073741824
*.processes=1000
*.remote_login_passwordfile='exclusive'
*.sga_max_size=2147483648
*.sga_target=3221225472

*.star_transformation_enabled='TRUE'
GGOSB2.thread=2
GGOSB1.thread=1
GGOSB2.undo_tablespace='UNDOTBS2'
GGOSB1.undo_tablespace='UNDOTBS1'
[oracle@exdb01dbs]$ 


Copy newly created pfile to dbs directory

[oracle@exdb01 dbs]$ cp /tmp/initGGOSB1.ora initGGOSB1.ora

Edit the values of *.sga_max_size to 3g

[oracle@exdb01 dbs]$ vi initTFOSB1.ora

Start database using edited pfile 

SQL> sartup mount pfile='initGGOSB1.ora';
ORACLE instance started.

Total System Global Area 3221225472 bytes
Fixed Size                  2929552 bytes
Variable Size            1786756208 bytes
Database Buffers         1392508928 bytes
Redo Buffers               39030784 bytes
Database mounted.
SQL>
SQL> show parameter sga

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
lock_sga                             boolean     FALSE
pre_page_sga                         boolean     TRUE
sga_max_size                         big integer 3G
sga_target                           big integer 3G
unified_audit_sga_queue_size         integer     1048576
SQL>
SQL> alter database open;

Database altered.

SQL>

Create new spfile on one of the disk group
SQL> create spfile='+RECOC1' from pfile;

File created.

SQL> shut immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
[oracle@exdb01dbs]$


Rename  the old pfile and  edit it
[oracle@exdb01 dbs]$ mv initGGOSB1.ora initGGOSB1.ora_old
[oracle@exdb01 dbs]$ vi initGGOSB1.ora
[oracle@exdb01 dbs]$ cat initGGOSB1.ora
spfile='+RECOC1/GGOSB/PARAMETERFILE/spfile.12740.914436113' [oracle@exdb01 dbs]$

Copy new init file to second node
[oracle@exdb01 dbs]$ pwd
/u01/app/oracle/product/12.1.0.2/dbhome_1/dbs
[oracle@exdb01 dbs]$ scp initGGOSB1.ora exdb02:/u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/initGGOSB2.ora
initGGOSB1.ora                                                                                                                                                                                         100%   60     0.1KB/s   00:00
[oracle@exdb01 dbs]$

Start the database
[oracle@exdb01 dbs]$ srvctl status database -d GGOSB
Instance GGOSB1 is not running on node exdb01
Instance GGOSB2 is not running on node exdb02
[oracle@exdb01 dbs]$ srvctl start database -d GGOSB
[oracle@exdb01 dbs]$ srvctl status service -d GGOSB
Service pGGOSBapp is running on instance(s) GGOSB1,GGOSB2
Service pGGOSBoem is running on instance(s) GGOSB1,GGOSB2
Service pGGOSBops is running on instance(s) GGOSB1,GGOSB2
[oracle@exdb01 dbs]$

All good :)