How to convert an instance to a cluster database

I have tried to perform this using Enterprise Manager, however I have never been successful. Here are the manual steps. Migrating a database from one RAC system to another can be performed by cloning the database, once it’s cloned it can be converted to a cluster database. The following steps are what is required. Step … Read more

How to change a MYSQL User Password

Solution Step 1. Login to the relevant server as any user and login to mysql as described below cd /usr/local/mysql/bin ./mysql -uroot Change the user password update mysql.user set password=’indreport’ where user=’indreport’; Query OK, 0 rows affected (0.11 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql> commit; Query OK, 0 rows affected (0.00 sec)

Truncate sys.aud$ table

How to reclaim space from system Solution Step 1. Check to see what is the lagest table in the system tablespace SELECT * FROM ( SELECT OWNER, SEGMENT_NAME, BYTES / 1024 / 1024 MB FROM DBA_SEGMENTS WHERE SEGMENT_TYPE = ‘TABLE’ ORDER BY BYTES / 1024 / 1024 DESC) WHERE ROWNUM

Database Capacity Planning

Capacity and Growth Forecast How to estimate the growth and forecast of a database on a host. Step-by-step guide The procedure is at the bottom of this article. Login to enterprise manager from sqlplus (from omsdbaup03) oracle@omsdbaup03:/users/oracle [emrep12c] $ sqlplus sysman/xxxxxx 2. Follow the following to calculate growth for each database on a host SQL> … Read more

Everything RAC – Cheat Sheet

The is to guide you through the Oracle RAC clustered system CRSCTL Command Note: -Any command which just needs to query information can be run using oracle user. But anything which alters Oracle Clusterware requires root privileges. First set oracle environment to CRS Start Oracle Clusterware UNIX>crsctl start crs Stop Oracle Clusterware UNIX>crsctl stop crs … Read more

Purge Oracle Maintenance Logs

Purging Oracle Logs The basis of this script is to purge logs from the Oracle Base directory daily The script will be executed from cron on a daily basis, however this could run at different times on each system due to business and or system load requirements. Technical Steps #!/bin/ksh #——————————————————————————– #– #– File name: … Read more

Missing Optimizer Statistics

ELECT ‘TABLE’ object_type, owner, table_name object_name, last_analyzed, stattype_locked, stale_stats FROM all_tab_statistics WHERE (last_analyzed IS NULL OR stale_stats = ‘YES’) AND stattype_locked IS NULL AND owner NOT IN (‘ANONYMOUS’, ‘CTXSYS’, ‘DBSNMP’, ‘EXFSYS’, ‘LBACSYS’, ‘MDSYS’, ‘MGMT_VIEW’, ‘OLAPSYS’, ‘OWBSYS’, ‘ORDPLUGINS’, ‘ORDSYS’, ‘OUTLN’, ‘SI_INFORMTN_SCHEMA’, ‘SYS’, ‘SYSMAN’, ‘SYSTEM’, ‘TSMSYS’, ‘WK_TEST’, ‘WKSYS’, ‘WKPROXY’, ‘WMSYS’, ‘XDB’) AND owner NOT LIKE ‘FLOW%’ UNION … Read more

Disk IO_WAIT

SELECT target_name, round(avg(average),2) FROM mgmt$metric_daily WHERE column_label = ‘Total Disk I/O made across all disks (per second)’ AND rollup_timestamp >= sysdate-14 AND rollup_timestamp <= sysdate group by target_name order by 2 desc; Up to 2000 is low (normal) Between 2000-5000 is busy over 5000 is high over 10000 is extreme