Infrastructure at your Service

Category

Database Administration & Monitoring

Daniel Westermann

Using AWS Storage Gateway as a backup target for PostgreSQL – Cached volume gateway

By | Database Administration & Monitoring | No Comments

In the last post we had a look on how you can use AWS Storage Gateway as File gateway to store your PostgreSQL backups safely offsite on AWS S3. Another method of doing that would be to use “Cached Volume gateway” instead of the File gateway we used in the last post. The volume gateways does not provide access via NFS or SMB but does provide a volume over iSCSI and the on-prem machines will…

Read More
Clemens Bleile

A change in full table scan costs in 19c?

By | Database Administration & Monitoring | No Comments

During tests in Oracle 19c I recently experienced this: [email protected]@orcl> select * from demo4 where m=103; [email protected]@orcl> select * from table(dbms_xplan.display_cursor); … ————————————————————————— | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ————————————————————————— | 0 | SELECT STATEMENT | | | | 26439 (100)| | |* 1 | TABLE ACCESS FULL| DEMO4 | 1 | 10 | 26439 (14)| 00:00:02 | ————————————————————————— –> The costs of the full table…

Read More
Daniel Westermann

Using AWS Storage Gateway as a backup target for PostgreSQL

By | Cloud, Database Administration & Monitoring | No Comments

In the last post we had a quick look at AWS Kinesis data streams and how you can push data to AWS S3 using AWS Firehose. Another great AWS service is AWS Storage Gateway and in this post we’ll use that to push our PostgreSQL backups to AWS. The primary usage of AWS Storage Gateway is to extend you local storage to AWS so that you do not have to extend your local storage on…

Read More

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