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.

SQL Server: How to find the default data path?

I have read a lot of SQL Server blog postings and articles in order to find the default data path. This post covers different SQL Server versions (SQL Server 2012, SQL Server 2014, SQL Server 2008, SQL Server 2005) and provides a generic script with different methods. Search with SERVERPROPERTY Since SQL Server 2012, we can use the parameter “InstanceDefaultDataPath”… 

Linux: how to monitor the nproc limit

By Franck Pachot . You probably know about ‘nproc’ limits in Linux which are set in /etc/limits.conf and checked with ‘ulimit -u’. But do you know how to handle the monitoring and be alerted when you’re close the fixed limit? Nproc and ps Nproc is defined at OS level to limit the number of processes per user. Oracle 11.2.0.4 documentation… 

How to list all Oracle system schemas

By Franck Pachot . Do you want to know which users come with the Oracle Database and which are the ones you have created? This is that not easy, especially prior to Oracle 12c. You know SYS and SYSTEM, but there are many others – especially when you have installed all options. And it is important to know them all,… 

Oracle Exadata – poor optimization for FIRST_ROWS

By Franck Pachot . In a previous blog, I discussed the difference between rownum and row_number(), in particular their behaviour in implicitely adding a first_rows(n) to the optimizer. That reminded me that I forgot to blog about an issue I encountered and which concerns both approaches. It was on an Exadata: a nice full table scan with smartscan was taking… 

Oracle 12c extended datatypes better than CLOB?

By Franck Pachot . 12c has introduced character strings that can can go above 4000 bytes. In the previous versions, in PL/SQL only we were allowed to have VARCHAR2 up to 32k. In SQL the VARCHAR2 datatype was limited to 4000 and CHAR was limited to 2000. That became a bit small especially when lot of applications needed to store… 

Check SQL Server Error Log size with a policy

In many blogs or articles, we can read that it is recommended to recycle the error log to be sure that the size is not too big In the Best Practice Analyzer (BPA) for SQL Server, this is a rule. But what is a good size for the error log file? I have often heard “it depends”, but in my… 

Oracle policy managed databases: Policies and policy sets

In this post, I will continue my experiments with Oracle policy managed databases with Grid Infrastructure, and present one of the new features introduced with Grid Infrastructure 12c last June: the cluster configuration policies and policy sets. It allows the administrator to dynamically reconfigure all server pools at a time, with a single command, according to the business workload. To… 

Oracle SQL Monitoring reports in flash, html, text

By Franck Pachot . I have recently posted on the way I like to extract execution plans. When we have Tuning pack, I suggest to get them with SQL Real-Time Monitoring as an active report. However, Martin Preiss said in a comment that he prefers the text format – easier to search, copy, and paste. And that’s a very good… 

Exploring Oracle SE & EE performance statistics with Orachrome Lighty

By Franck Pachot . At dbi services, we really like Lighty for Oracle, a tool which helps exploring performance statistics whether they originate from AWR (available only in Enterprise Edition with Diagnostic Pack option) or from Statspack (available via Standard Edition). As a matter of fact, we like it so much that we have became Orachrome Partner. If you want… 

Implementing policy-managed Oracle databases

Policy-managed databases appeared with Oracle 11g R2 but are not very common yet. I never had the opportunity to administer these kind of databases. Since Oracle now presents policy-databases as the default installation mode and as a best practice, I wanted to know more about this feature which fully automatizes the databases repartition within an Oracle cluster. In this post,… 

Improving your SharePoint performance using SQL Server settings (part 1)

SharePoint performance is a recursive problem and preoccupation. As a Database Administrator, we have to deal with SharePoint when configuring SQL Server databases. In this article, I will propose a list of best practices in SQL Server settings aimed to reduce SharePoint performance issues. This article is inspired from the presentation Optimizing SQL Server for Speedy SharePoint by Sahil Malik… 

ROWNUM vs ROW_NUMBER() and 12c fetch first

By Franck Pachot . Prior to Oracle 12c, there were two ways to do ‘top-n’ queries: use rownum after sorting rows with “order by” use row_number() over (order by) Top-n queries are usually required for result pagination. The application shows the first 10 rows, then the next 10 on the following page, etc. In these queries, user interactions are often…