Saving database space with ASSM

It’s good way reclaim WASTED space from tables and index using  the Segment Advisor.

To perform an database reclaim procedure using Automatic Segment Space Management (ASSM) it is preferred to create tablespaces with below option:

grepdb> CREATE TABLESPACE HR
DATAFILE '+GREPORADG/'
SIZE 10M EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;

Only tablespaces with segment space auto are eligible to Segment Advisor.

To manually run the Segment Advisor on OEM:

guid-65f07e4f-0482-47df-bdf9-8d34b625093a-default

It will save some database storage area, and make it more effective cause by LHWM/HHWM.

Maiquel.

How to sincronize high data volume with GoldenGate – Part II

In the latest post, I documented how to copy/move high table data volume using GoldenGate Initial Load (with SPECIALRUN option).

Sometimes, we (dba/sysadmins) need to move HIGH data (tables with billion rows), in shortest time possible.

So, sharing useful tips, that helps to reach this goal.

Making GoldenGate Initial load work as PARALLEL:

More“How to sincronize high data volume with GoldenGate – Part II”

How to sincronize high data volume with GoldenGate

I was taking high workload with data load methods, so I decided to move out of comfort zone and fortunately discovered a excellent way to copy/move high data volume with GoldenGate Initial Load.

It’s well documented by Oracle and gavinsoorma.com (best and simple one).

# On source GoldenGate (ggsci>):

GGSCI> ADD EXTRACT load1, SOURCEISTABLE
GGSCI> EDIT PARAMS load1

EXTRACT load1
userid ggate@goldengate
RMTHOST target-mgr.grepora.com, MGRPORT 7809
RMTTASK replicat, GROUP load2 FORMAT LEVEL 4

---Loading tables
map CUSTOMER.TABLE1;
 

More“How to sincronize high data volume with GoldenGate”

Apache 2.4 with port redirect to Weblogic 12c

According Oracle guys, Apache 2.4 its is a vanila module to Weblogic 12c and same module runs with Weblogic 11g.

Modules are available to download:  https://blogs.oracle.com/WebLogicServer/entry/announcing_web_socket_proxy_and

# httpd -version
Server version: Apache/2.4.6 (Red Hat Enterprise Linux)
Server built:   Mar 21 2016 02:33:00

On httpd.conf is necessary to load Apache 2.4 module

LoadModule weblogic_module modules/lib/mod_wl_24.so

More“Apache 2.4 with port redirect to Weblogic 12c”

RHEL7: rc.local service not starting

It’s very common to automate application startup in rc.local on Linux systems.

Was testing Red Hat 7.2 (Maipo), and found that apps was’t started.

Found this on some Red Hat blog: 

Systemd is a system and service manager for Linux operating systems. It is designed to be backwards compatible with SysV init scripts, and provides a number of features such as parallel startup of system services at boot time, on-demand activation of daemons, support for system state snapshots, or dependency-based service control logic. In Red Hat Enterprise Linux 7, systemd replaces Upstart as the default init system.”

On default /etc/rc.local comes useful info:

#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run ‘chmod +x /etc/rc.d/rc.local’ to ensure
# that this script will be executed during boot.

touch /var/lock/subsys/local

Then, this ‘chmod’ turns rc.local enable during system startup.

 

To familiarize this new feature:

[root@somesystem~]# systemctl status rc-local
● rc-local.service - /etc/rc.d/rc.local Compatibility
Loaded: loaded (/usr/lib/systemd/system/rc-local.service; static; vendor preset: disabled)
Active: active (running) since Mon 2016-07-11 13:16:18 BRT; 28min ago
Process: 1046 ExecStart=/etc/rc.d/rc.local start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/rc-local.service
├─2272 /bin/sh /oracle/domains/mywl_domain/startWebLogic.sh
├─2284 /bin/sh /oracle/domains/mywl_domain/bin/startWebLogic.sh
├─2374 /bin/sh /oracle/domains/mywl_domain/bin/startNodeManager.sh
├─2377 /bin/sh /oracle/binaries/wlserver/server/bin/startNodeManager.sh
├─2428 /oracle/jdk1.7.0_25/bin/java -Dwls.home=/oracle/binaries/wlserver/server -Dweblogic.home=/oracle/binaries/wlserver/server -server -Xms1g -Xmx1g -XX:MaxPermSize=512m -Dcoherence...
└─2442 /oracle/jdk1.7.0_25/bin/java -server -Xms1g -Xmx1g -XX:MaxPermSize=512m -Dweblogic.Name=AdminServer -Djava.security.policy=/oracle/binaries/wlserver/server/lib/weblogic.policy .

Maiquel.
 

Changing ACFS mount point

I do checked there’s no good way to change ACFS mounting point on asmca assistant, so I decided to document how I quickly change ACFS mount point:

    1. MAKE BACKUP ( in my case, there are no data loss );
    2. Do bellow:
root@mymachine:/oracle/product >/grid/product/12.1.0.2/bin/srvctl stop filesystem -d /dev/asm/ggatebin-68

root@mymachine:/ >/usr/sbin/acfsutil registry -d /dev/asm/ggatebin-68
acfsutil registry: successfully removed ACFS volume /dev/asm/ggatebin-68 from Oracle Registry

root@mymachine:/ >/usr/sbin/acfsutil registry -a /dev/asm/ggatebin-68 /oracle/product/goldengate12c/
acfsutil registry: mount point /oracle/product/goldengate12c successfully added to Oracle Registry

root@mymachine:/oracle/product >chown -R oracle.oinstall goldengate12c
root@mymachine:/oracle/product >chmod 755 goldengate12c

Maiquel.

Failure unregister integrated extract

Some times it’s impossible to unregister Integrated Extract, however it need to exclude to avoid RMAN failures.

Follow below to hack GoldenGate registration:

SQL> select CAPTURE_NAME from dba_capture;

CAPTURE_NAME
------------------------------
OGG$CAP_IE_CAPT

GGSCI (myhost as ggate@foodb) 13> unregister extract IE_CAPT database

ERROR OGG-08222 EXTRACT IE_CAPT must be registered with the database to perform this operation.

Try it:

SQL> select 'exec DBMS_CAPTURE_ADM.DROP_CAPTURE ('''||capture_name||''');' from dba_capture;

'EXECDBMS_CAPTURE_ADM.DROP_CAPTURE('''||CAPTURE_NAME||''');'
----------------------------------------------------------------------
exec DBMS_CAPTURE_ADM.DROP_CAPTURE ('OGG$CAP_IE_CAPT');

SQL> exec DBMS_CAPTURE_ADM.DROP_CAPTURE ('OGG$CAP_IE_CAPT');

PL/SQL procedure successfully completed.

Maiquel.

GoldenGate 12.1.2 not firing insert trigger

I had to troubleshoot a situation, after GoldenGate capture some DML and replicate that, Oracle database needs to run insert trigger making some business integration.

After to upgrade this enviroment from GG 11.1.1.1 to 12.1.2 and DB 11.2.0.3 to 12.1.0.2, was identified that GoldenGate wasn’t running this triggers

So, found interesting resolution on Oracle Docs:

SUPPRESSTRIGGERS | NOSUPPRESSTRIGGERS

Valid for nonintegrated Replicat for Oracle. Controls whether or not triggers are fired during the Replicat session. Provides an alternative to manually disabling triggers. (Integrated Replicat does not require disabling of triggers on the target system.)

SUPPRESSTRIGGERS is the default and prevents triggers from firing on target objects that are configured for replication with Oracle GoldenGate. SUPPRESSTRIGGERS is valid for Oracle 11.2.0.2 and later 11gR2 versions. SUPPRESSTRIGGERS is not valid for 11gR1.

So, added ‘DBOPTIONS NOSUPPRESSTRIGGERS’ in the replicat parameter file.

Regards!
Maiquel.