Posts

Showing posts with the label Oracle

"Failed to start LSB: Bring up/down networking" after OEL 7 VM build

I imported newly built OEL 7.7 VM from Oracle VirtualBox to an ODA (Oracle Database Appliance). Upon starting up the VM, the network was showing as being up for device "eth0" however the /etc/sysconfig/network-scripts/ifcfg-eth0 was existent at the moment. I restarted the network service but received the "Failed to start LSB: Bring up/down networking" error. I followed the below steps to resolve this error. 1.  Stop and disable the NetworkManager service.      # systemctl stop NetworkManager.service      # systemctl disable NetworkManager.service 2.  Enable the network service.      # systemctl enable network.service 3.  Create the ifcfg-eth0  and populate with the appropriate information.      # vi /etc/sysconfig/network-scripts/ifcfg-eth0 contents: TYPE=Ethernet BOOTPROTO=static NAME=eth0 DEVICE=eth0 ONBOOT=yes IPADDR=<IP_ADDRESS> NETMASK=<SUBNET_MAS...

Dynamically gather DDL for Oracle database tablespaces

Here is a script that I use to dynamically generate the SQL to recreate tablespaces in another database.  I essentially want all tablespaces that are non-system related.  You can model this script by whatever you need to use the package DBMS_METADATA.GET_DDL in your DBA life. -- @gen_ddl_tbsp.sql spool tbsp_ddl_gen.sql set lines 120 head off feed off pages 0 long  1000000 select 'set lines 120 pages 0 long 1000000' from dual; select 'spool tbsp_ddl.sql' from dual; select distinct 'SELECT DBMS_METADATA.GET_DDL(' || '''' || 'TABLESPACE' || '''' || ',' || '''' || tablespace_name || '''' ||') || ' ||'''' ||' /' ||'''' ||' FROM DUAL;' from dba_tablespaces where tablespace_name in (select tablespace_name from dba_tablespaces where tablespace_name not in ('SYSTEM','USERS','SYSAUX','UNDOTBS1','UN...