Imagine you have several Oracle databases on the same host under same OS user.
In scripts directory you have shell script that kills OS processes.
Idea is to call OS script from database procedure and kill problematic process using shell script.
Script will run simple query to get process id and kill that process.
But how to assure that this script will execute in correct environment for correct database?
One way is to create one (more...)
Few days ago I saw great post from Norman Dunbar
on how to fix a broken ASM spfile.
With version 11gR2 ASM spfile can be stored in ASM diskgroup and by default Oracle Installer will put it there. So if you want to create pfile from spfile your ASM instance should be up and running.
If you have incorrect parameter in ASM spfile which is blocking ASM to start than you have slight problem. You (more...)
Restore points and Flashback database are nice features introduced in 10g database that provide efficient point in time recovery to reverse unwanted data changes.
But what if you have Standard Edition database:
SQL> shutdown immediate;
SQL> startup mount;
SQL> alter database flashback on;
alter database flashback on
ERROR at line 1:
ORA-00439: feature not enabled: Flashback Database
In Standard Edition you don’t have Flashback Database feature, but you can still create restore points and (more...)
There are many articles explaining how to migrate database from file system into ASM. You could use RMAN to create an image copy of the database into ASM and switch to the database copy, restore database from backup sets into ASM or create duplicate database.
All of these RMAN features are available on Oracle versions before 12c.
In this post I will use slightly different approach - using online relocation of data files into ASM. (more...)
Percona Toolkit is collection of command-line tools to perform many MySQL tasks like creating backups, finding duplicate indexes, managing replication, etc.
In this post I will talk about how to measure replication lag and check/fix replication inconsistencies with this tools: pt-heartbeatpt-table-checksumpt-table-sync
I am using environment from previous blog post.
Master-Master replication with MariaDB 10.0.16 database on Debian 7.
Install Percona Toolkit
on both nodes:
$ sudo wget percona.com/get/percona-toolkit.deb
The simplest and probably most common replication method is master-slave
replication. Basically, data is replicated from master database to the slave. In case of master database failure you must get the slave database up-to-date before failover and then promote slave to be new master.
Another method is to set up replication in both directions called master-master
replication. But you must be aware that this setup brings some potential issues as data changes are happening on (more...)
Few days ago I experienced strange issue in my development environment running on OEL 5.8 with EXT4 filesystem. Note - EXT4 filesystem is supported from OEL 5.6 version.
This was virtual machine running oldish 10.2.0.5.0 Oracle database.
I noticed that backup for my database is failing because of archive log corruption. As this is development database I've simply deleted corrupted archive logs and initiated full backup again. But backup (more...)
Imagine you have 11gR2 Oracle Restart configuration with database files located in ASM.
After server crash you realized that local disks are corrupted and with local disks you lost all Oracle installations. Even though this is important system you don’t have database backup (always take backups!).
But you managed to save all ASM disks as they were located on separate storage.
This will be small beginner guide on how to help yourself in such (more...)
When I create virtual machines on my notebook I always create too small disk for root partition or partition where I put Oracle binaries. After a while when I want to perform upgrade, or install another Oracle software, there is not enough space. This time I want to note steps about how to increase disk free space.
I can easily extend or shrink my logical volumes because I am using LVM in my virtual machines. (more...)
Oracle Flex ASM was introduced in 12c version. This is one of the best features introduced with new version in my opinion.
I won’t speak in detail about Flex ASM because you can find more information in documentation. In this post I will concentrate on how Flex ASM handles crash of ASM instance.
For this test I’ve created 2 node cluster - 12c Grid Infrastructure with Flex ASM enabled.
$ asmcmd showclustermode
ASM cluster : (more...)
I love to read Oracle related blogs, forum posts and mailing lists much more often than books. Why? Because there many Oracle DBA’s and developers share their experiences, problems, "best practices",... which are very valuable to me.
It's great that we have so big and active Oracle community.
Today I noticed mail from Oracle-L
list where someone asked for help with recovery after overwriting production controlfiles. Check Oracle-L
for more info.
It reminded me that (more...)
In this post I want to explain how to create duplicate database from active 11gR2 database using RMAN. There are many blog posts covering that subject but most of them are covering non-ASM to non-ASM, ASM to ASM or non-ASM to ASM duplications.
I want to cover ASM to non-ASM (more...)
I am regular follower of Oracle-l
mailing list which is great source of knowledge for Oracle experts. Two days ago one Oracle DBA posted question “RMAN restore/recover problem
” which induced me to re-check my knowledge about some RMAN PITR scenarios.
So I’ve performed some tests and decided to (more...)
In this post I want to show how to test what will happen with your cluster if you simply detach shared storage device from it. VirtualBox is great tool for that purpose because you can test such scenario without involving many people or causing any damage.
I am aware that (more...)
Starting with 11g Oracle can perform block media recovery using flashback logs to get good copies of the blocks.
Flashback database is not enabled by default so first step would be to enable it. When enabled a process RVWR (Recovery Writer) copies modified blocks to flashback buffer. Later this buffer (more...)
I’ve installed Oracle Grid Infrastructure on one of my standalone test servers. This software includes Oracle ASM as volume manager and Oracle Restart for managing Oracle components.
As recommended, Grid Infrastructure and RDBMS software are installed under different users.
Grid Infrastructure: 126.96.36.199.0
RDBMS: 11.2.0. (more...)