Skip to content

Database

Everything our consultants learn while running databases for customers: Oracle, PostgreSQL, SQL Server, MySQL, MariaDB, MongoDB and Delphix. Expect hands-on posts about installation, day-to-day administration, backup and recovery, performance tuning, replication and upgrades.

Quickly create a hundred databases and users

Do you need a hundred databases and users for training etc. in PostgreSQL? Just a few lines of code: [postgres8@oel7 data]$ cat create_databases.sh #!/bin/bash NUMOFDBS=100 for i in `seq ${NUMOFDBS}`; do psql -q -c “create user u${i} UNENCRYPTED password ‘u${i}’ NOCREATEDB NOCREATEROLE NOCREATEUSER” postgres createdb -O u${i} db${i} done Execute it and you are ready: [postgres8@oel7 data]$ time ./create_databases.sh real… 

RAC buffer states: XCUR, SCUR, PI, CI

By Franck Pachot . In RAC, blocks are copied across instances by the Global Cache Service. In single instance, we have only two status: CR for consistent read clones where undo is applied, and CUR for the current version that can be modified (then being a dirty block). I’ts a bit more complex in RAC. Here is a brief example… 

another way to list invalid objects

How often did I type a query like this to list the invalid objects in a database? select count(*) from dba_objects where status ‘VALID’; — and user in/not in Today I learned another way to do the same. There is a view called dba_invalid_objects. Surprisingly the view is not listed in the official 12c database reference. It is however mentioned… 

Multithreaded 12c and ‘connect / as sysdba’

By Franck Pachot . In Oracle 12c you can run Oracle processes as operating system threads, lowering the number of OS processes. But you can’t use OS authentification: you need to provide a password. Here is a way to set an environment so that you can still ‘connect / as sysdba’ to a multithreaded instance. Windows I start with Windows… 

2 ways to move archivelogs – both need RMAN

By Franck Pachot . The database must know where are the files. If you move them from the OS, the database will not be aware of it. But there is a database tool to copy or move files and update the database repository (controlfile). It’s RMAN. With RMAN you can either: update the repository after you’ve moved the file from… 

Buffer pool advisory in AWR

By Franck Pachot . In Oracle memory advisors: how relevant ? I said that advisors are calculating their recommendations from statistics cumulated since the begining of the instance, even in AWR which is supposed to cover only a short period. Here is a quick test on buffer pool advisory to validate that assumption. I’m running the following query to compare… 

Does the block size matter?

By Franck Pachot . The default block size is 8k in Oracle. This is the most common. Sometimes, people create the database with 16k block size for datawarehouses. You can also find some 32k block size, but less common which means more bugs. In our tuning workshop we recommend the default, 8k, for most of the cases. I’ll show here… 

SQL Server 2016 CTP2: Stretch database feature – Part 2

In my previous blog SQL Server 2016 CTP2: Stretch database feature – Part 1, I explained how to prepare your instance and your database to enable the Stretch feature for your table. Now I present you how to enable the feature for your tables! Prerequisites Enabling Stretch Database at the table level requires ALTER permissions on this table.   Limitations… 

ODA workshop at Arrow ECS

On the 16th and 17th of June David Hueber, Georges Grey and myself had the chance to attend the ODA hands on workshop at Arrow ECS. Lead Trainer Ruggero Citton (Oracle ODA Product Development) did the first day with plenty of theory and examples. On the second day we had the opportunity to play on a brand new ODA X5-2:… 

SQL Server 2014: Analysis, Migrate and Report (AMR) – a powerful In-Memory migration tool

An important new functionality of Microsoft SQL Server 2014 is the In-Memory OLTP engine, which enable you to load Tables and also Stored Procedures In-Memory for a very fast response time. The goal is not to load all the database In-Memory but just Tables with critical performances and Stored Procedures with complex logical calculations. To identify which Tables or Stored… 

statistics_level parameter

With Enterprise Manager Cloud Control 12c configuring and using the compliance standard utility allows us to discover events we should not have seen in other ways. Today at a customer’s site I discovered the following message:   The configuration Best Practice for Oracle Database discovered the statistics_level parameter was set to the value ALL.   By selecting the Violation in…