Infrastructure at your Service

Category

Database Administration & Monitoring

SQL Server: Quickly clean backup history with dbatools

By | Database Administration & Monitoring | No Comments

I just had to restore a database in production for my customer. Before doing the restore I have the habit to query the msdb.dbo.backupset table to get an overview of the last backups. When running my query, I felt it was taking longer than usual. So out of curiosity, I looked at the SSMS standard report “Disk Usage by Top Tables”. Here is the output. This instance contains dozens of databases in Always On Availability…

Read More
Daniel Westermann

Sending PostgreSQL data to AWS S3 by using AWS Kinesis data streams

By | Cloud, Database Administration & Monitoring | No Comments

Before we really start with this post: This is just an experiment and you should not implement it like this in real life. The goal of this post is just to show what is possible and I am not saying that you should do it (the way it is implemented here will be catastrophic for your database performance and it is not really secure). As I am currently exploring a lot of AWS services I…

Read More
Daniel Westermann

PostgreSQL message levels

By | Database Administration & Monitoring | No Comments

When you start to write business logic in the database by using triggers or functions/procedures you usually want to report messages to the user that runs your code or you want to include some debugging output for your own. In Oracle a lot of people use the dbms_output package to return simple messages to the user’s screen. In PostgreSQL you can do the same but of course the way it is implemented is not the…

Read More
Stéphane Haby

SQL Server Tool: MSSQL-CLI

By | Database Administration & Monitoring, Database management, SQL Server | No Comments

MSSQL-CLI is a useful new command line tool. Not so new because this tool exist since 2018 but a little bit unknow. You find this tool on GitHub here. One of the big advantage is the number of platforms available, Windows of course but also macOS, Ubuntu, Debian, CentOs, Red Hat, OpenSuse, Suse Enterprise and Fedora. This interactive command-line query tool has many advantages like the full IntelliSense support, the auto-complete, the syntax highlighting, the…

Read More
Daniel Westermann

Migrating an Oracle instance to AWS Aurora – 4 – AWS DMS Change Data Capture (CDC)

By | Database Administration & Monitoring | No Comments

This is the last post in this little series about migrating on Oracle instance to AWS Aurora with PostgreSQL compatibility. For the previous one you can check here, here and here. In this post we’ll look at how you can configure change data capture so that changes on the source Oracle instance are automatically replicated to the target Aurora instance. In a real life migration this is what you probably need as long down times…

Read More
Daniel Westermann

Migrating an Oracle instance to AWS Aurora – 3 – Data replication with AWS DMS

By | Database Administration & Monitoring | No Comments

If you followed the last two posts in this little series (here and here) this is the current status of this demo migration project: We have converted the Oracle SH schema and applied it to the target AWS Aurora with PostgreSQL compatibility instance. This worked quite well but a few objects (mostly PL/SQL procedures) would need manual actions. The next and final step is to replicate the data from Oracle to the Aurora instance using…

Read More
Daniel Westermann

Migrating an Oracle instance to AWS Aurora – 2– The AWS Schema Conversion Tool (SCT)

By | Database Administration & Monitoring | No Comments

Having the required infrastructure ready now it is time to have a look at the AWS Schema Conversion Tool (SCT). The goal of this tool is to convert a source schema (Oracle in our case) to a target schema (AWS Aurora in our case). From the description this should also migrate stored functions and procedures and we will see later on how well that works. Automatically converting Oracle’s PL/SQL to PostgreSQL’s PL/pgSQL quickly becomes tricky…

Read More
Daniel Westermann

Can I put my temporary tablespaces on a RAM disk with PostgreSQL?

By | Database Administration & Monitoring | No Comments

The short answer to the title of this blog post is: yes, of course you can. The more important question is: should you? The PostgreSQL documentation about tablespaces contains an explicit warning: “Placing a tablespace on a temporary file system like a RAM disk risks the reliability of the entire cluster”. This is for sure true for tablespaces containing persistent data, but what about objects/files that are created in a temporary tablespace like temporary tables…

Read More
Daniel Westermann

Migrating an Oracle instance to AWS Aurora – 1 – Setting up the base infrastructure

By | Database Administration & Monitoring | No Comments

Migrating database to the cloud is a hot topic since a few years. As more and more of our customers are in the cloud, and some of them in AWS, migrating some of their Oracle databases to AWS Aurora becomes a topic from time to time. In this little blog series we’ll have a look at how you can use the AWS Database Migration Service (DMS) and the AWS Schema Conversion Tool (SCT) for simplifying…

Read More
Christophe Cosme

AWS Automation – Stop a RDS instance

By | Cloud, Database Administration & Monitoring, Database management | No Comments

Introduction I created a RDS SQL Server instance on AWS. I use it for test purpose and to minimize the costs I needed to ensure that my instance is stopped automatically at the end of the working day and also because on RDS instances are automatically activated when its schedule maintenance is triggered. In this article I will share the solution I implemented to achieve my goal. I assume you have already created a RDS…

Read More