I just created a one-page APEX application to show performance chart of our main production server based on Active Session History data. We publish it on a big monitor so we can see the performance chart during the day. It’s not a big deal but it’s really useful. I used 2D stacked column chart and make the chart simple (contains only 3 colors: green for CPU, blue for user IO and orange for all other waits) like the ones you see on EM12c database home pages. Original chart:Read More
New year is coming, if you want to check date based partitions in PostgreSQL , you may use the following query:
max( highvalue )
namespace.nspname AS schema_name,
parent.relname AS table_name,
as varchar)),2,10),'YYYY-MM-DD') highvalue
JOIN pg_class parent ON pg_inherits.inhparent = parent.oid
JOIN pg_class child ON pg_inherits.inhrelid = child.oid
JOIN pg_namespace namespace ON namespace.oid = parent.relnamespace
JOIN pg_constraint cons ON cons.conrelid = child.oid
WHERE cons.contype='c' ) ss
group by schema_name, table_name
order by 1,2,3 desc;
As Turkish Oracle User Group (TROUG), we will organize our second meeting in Ankara on December 23rd. The event will be held at the Chamber of Electrical Engineers (EMO). The main theme of the meeting is Oracle 12c. There will be 4 sessions about new features of Oracle 12c (Database In-Memory, Active Data Guard, RAC and Flex ASM and Multitenancy). I usually do presentations about Enterprise Manager but this time, I have picked a more popular subject, and will do a presentation about Oracle Database In-Memory. I’ll talk about why memory is faster (so obvious right?), buffer cache, columnar storage technology, competitive products and why Oracle’s in-memory is different.
There will be also interesting sessions about BI/DW, PL/SQL, Database Security and Database Administration.Read More
In one of my old posts, I wrote a step by step guide to install Ops Center on Linux. I still get questions about installation, mostly about installing repository Database. So I have downloaded latest patch set version if anything has changed about installation, and decided to write tips and tricks to help Ops Center users. If you have read my previous blog, or you are already an Ops Center user, you may remember that Ops Center can create required Oracle users, and install Oracle Database by itself. You can see the Ops Center web site, that you need to follow My Oracle Support Document 1450669.1 to download to obtain Oracle Database 11g for Ops Center, and the MoS document says, you need to download 22.214.171.124 files and put them into “/var/tmp/downloads” folder. I don’t know if these RPMs are still valid, the latest Ops Center seem to support 126.96.36.199. So I recommend you to download Oracle 188.8.131.52 (patch 13390677). You need to put the zips files into /var/tmp/downloads folder. After you copied files, the creation of users and setting up local repository database is totally automated by the Ops Center installer.
I always think that Ops Center is a very smart installer, and it can handle almost everything. On the other hand, instead of dealing errors/warnings while installing, I recommend you to use OCDoctor, a small utility to check prerequisites. Download the latest OCDoctor zip file, extract it and run it:
In my previous blog post, I explained how to install PostgreSQL 9.3 on Oracle Linux. As a DBA, one of the first things we want to learn is how we can recover the database in case of a failure. So in this blog post, I’ll show how to backup and restore PostgreSQL databases in a server. We’ll backup PGDATA directory, so it’ll contain all databases in the instance (remember that PostgreSQL is a multitenant database).
PostgreSQL supports Write Ahead Log (WAL) mechanism like Oracle. So everything will be written to (redo)logs before they written into actual datafiles. So we will use a similar method to Oracle. We need to start “the backup mode”, copy the (data) files, and stop the backup mode, and add the archived logs to our backup. There are SQL commands for starting backup mode (pg_start_backup) and for stopping backup mode (pg_stop_backup), and we can copy the files using OS commands. Good thing is, since 9.1, PostgreSQL comes with a backup tool named “pg_basebackup”. It’ll do everything for us.Read More