Blog Archives

How to connect Python and SQL Server

Hi everyone!!

Lately I have been studying a bit of Python that I intend to use at work for some projects and also for learning a new language. I would recommend for you to also learn it, because as you know Python is coming to SQL Server 2017. The thing is that with Python you can use in your Machine Learning models, build Websites using some other frameworks such as: Django or Flask and even automate trivial tasks of your daily basis.

However, something that I know from the top of my head now is: Python was not designed in the first hand to deal with Microsoft SQL Server as a backend database. You don’t find lot’s of examples, the documentation sometimes is a bit misleading and errors and more errors that you cannot even imagine. If you search about Python + MySQL, Python + PostgreSQL, you will find lots of examples out there. I am not saying this is bad or anything, but it is just the way it is.

Anyway, my idea is below to show how to connect Python and SQL Server. I am not going to show how to install Python or SQL Server, but I do assume you have some knowledge on it. Read the rest of this entry

How much transaction log, transactions generate?

Hi Everyone,

I wanted to share something that I am doing this week at work. One of the applications that I support is generating a lot of transaction log in the database. Just to have an idea, we run Transaction Log backups every 30 minutes and I have backups over 100GB and sometimes 200GB. The difficult part of investigating what is generating that amount of log is because the databases involved are used by at least 3 different applications and streams. So, I remember that in the past I created a simple script that looks at this information in the database and then I may have more inputs of what is really generating that amount of log. Read the rest of this entry

The overlapped instance error

One of the possible scenarios for SQL Server FCI to AG migration is adding a third node to the Windows Failover Cluster and creating an Availability Groups between the FCI and the third standalone SQL Server, or having one node as FCI and the other node as a standalone SQL.

In my case I am running with the second option. I have one node with SQL Server 2014 FCI and the other node SQL Server 2016 Standalone, but the servers are in the Windows Cluster. When you try to create the Availability Groups between them you get the following error. Read the rest of this entry

Berlin Azure Global Bootcamp 2017 – Scripts & Slides

Hi Guys,

Last saturday (24.03) I had the pleasure of doing my first talk outside Brazil and my first one in Berlin where I could talk a bit of Azure SQL Database in the Azure Global Bootcamp that happened at Microsoft Berlin. First of all, I would like to thank Anton Staykov and Tyrone Guiamo for inviting me for talking at the event, it was really cool. The talk was very interesting and I’ve got some very good questions. Something it is also worth to mention is that slowly companies in here are looking more and more for Microsoft Azure and specifically for Azure SQL Database. Read the rest of this entry