Manually starting a VDB
When starting an Oracle VDB instance, an initialization file $ORACLE_BASE_CONFIG/dbs
is used and by default, this directory does not have group write permissions. Previously to Delphix 6.0.10.0, this limitation forced target hosts to either use the instance owner for provisioning or modify the group permissions on this directory. Both options can be seen as a security risk and increase deployment complexity.
With Delphix Engine 6.0.10.0 onwards, a target host no longer requires write permission to the $ORACLE_BASE_CONFIG/dbs
directory. Delphix Engine will only copy an initialization file init<> to this directory if write permissions exist.
All instance startup attempts from Delphix operations will specify an initialization file to use from the Delphix filesystem rather than the default Oracle location. If a VDB needs to be manually started and Delphix was unable to copy the initialization then it must be specified in the startup command. The instance init file is available in the VDB script directory.
You can use the following syntax to manually start the instance:
SQL> startup pfile='/mnt/provision/VDBOMSR66E005_61O/script/VDBOMSR66E061O/initVDBOMSR66E061O.ora';
ORACLE instance started.
If there is no write permission in the $ORACLE_BASE_CONFIG/dbs
directory then manually starting the instance will fail:
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initVDBOMSR66E061O.ora'
To manually start a VDB, complete the following steps:
Ensure that the VDB is enabled and NFS filesystems are mounted. This is required only when the NFS filesystems are offline. Follow the below steps via CLI.
CODEdemo source> select VDBOMSR66E005_61O demo source 'VDBOMSR66E005_61O'> enable demo source 'VDBOMSR66E005_61O' enable *> set attemptStart=false demo source 'VDBOMSR66E005_61O' enable *> commit Dispatched job JOB-47 SOURCE_ENABLE job started for "VDBOMSR66E005_61O". Enabling dataset "VDBOMSR66E005_61O". Exporting storage containers from the Delphix Engine. Mounting datasets. Dataset "VDBOMSR66E005_61O" enabled. SOURCE_ENABLE job for "VDBOMSR66E005_61O" completed successfully.
Login to the target host as a Delphix OS user.
Locate the VDB scripts directory. This is located at
/<toolkit_directory>/Delphix_<engineuuid>_<delphix_osuser_id>_<host|cluster>/databases/oracle/<vdb_uniq_name>/<vdb_instance_name>/.
CODEcd /work/Delphix_8e501f827dee_a7a9072fc4fe_2_host/databases/oracle/VDBOMSR66E005_61O/VDBOMSR66E061O
Run "
setup-oraenv.sh"
. This configures the Oracle environment variables such as ORACLE_SID and ORACLE_HOME.Startup the instance by specifying the path to the instance init file in the scripts directory.
CODE[oracle@mwrh74-ora11204-tgt VDBOMSR66E061O]$ sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.4.0 Production on Thu Jul 22 02:40:47 2021 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup pfile='/work/Delphix_8e501f827dee_a7a9072fc4fe_2_host/databases/oracle/VDBOMSR66E005_61O/VDBOMSR66E061O/initVDBOMSR66E061O.ora'; ORACLE instance started. Total System Global Area 1068937216 bytes Fixed Size 2260088 bytes Variable Size 616563592 bytes Database Buffers 444596224 bytes Redo Buffers 5517312 bytes Database mounted. Database opened. SQL>
If Delphix Engine has permission to write to $ORACLE_BASE_CONFIG/dbs
during provisioning, the instance can be started up with only the "startup" command.