As a matter fact, it is not new that dbatools is a great PowerShell module for the SQL Server DBA, and from time to time they come up with new functions that for me I just think: Why I never thought about it before?
Today I want to talk about the function Remove-DbaBackup and more specifically my customized version of it. No, I didn’t rewrite Remove-DbaBackup but rather improved to my environment. The function by itself is just great and it addresses the goal of removing the backups nicely, but at the end, the function was not doing something that I wanted. Read the rest of this entry
Guten Morgen zusammen!
Die zeit zur minem nächsten session ist gekommen!
It is a mixed feeling of excitement and being nervous at the same time!
This weekend I will be, along with my friend and also Data Platform MVP Fabiano Amorin, delivering a session at SQL Saturday 772 in Munich/Germany.
Together with him, we will deliver the following session: Stop Everything! T-SQL tips to make a developer life easier!
We promise it will one hour of really cool demos and also some surprises for you! I guess you will like what you are going to see.
Off course I want you guys in our session, but as Fabiano is coming from Brazil for the event, he is also going to deliver a second session called: 13 reasons why my query is slow, which I will be certainly checking it out, and you should do the same.
Other than that, you have at least other 25 sessions that you can choose to watch, there is something to please everyone. Ah! I should say that you have to register yourself ASAP, as open seats are running out very fast.
I will be the whole day in the konferenz, and I’d love to talk with you! Make sure to stop by.
Data Platform MVP
At work, I got to do some really interesting stuff. What I like is they really give me the freedom to try things out. Ah, and if you wanna join us, we have a position to work with me, posted here: https://grnh.se/4899e2091.
There is a saying, which I don’t exactly remember, is that a backup is only a backup if you test the restore of the same. So, I was working on creating an automated way of restoring the backups of my production databases and give me some sort of reporting around it.
So, I did that work and it is running really fine with the structure that I have. Then, I had the idea to share what I did with the community, mainly because I rely on almost all of my work to dbatools, and without them I would have more trouble/work do, to get the same results.
I shared a screenshot on twitter as you can see below.
I got a few replies from people saying that they would like to see how it is done. So, in this blog post, I’ll explain you all the steps that I had to do, to obtain this result.
There will be 18 sessions with a variety of topics for you to choose 🙂 If you live in Lviv or nearby you should definetely check it out.
Honestly, I am really excited to be in Lviv, I never expected that one day I would be in Ukraine and also going there for speaking, it is a double excitement!
I will be speaking about some 10 alerts that you shoul have it running in your SQL Server. It is a very interesting topic in those days where everything is “automated”, right? If you are attending the event, make sure to join me at 12:50PM for the session: 10 alerts that you should have it running in your SQL Server.
If you follow me here or in my twitter @marcosfreccia and you are going to attend the event, make sure to stop by and say hello!!
Data Platform MVP
I am a fan of not reinventing the wheel. What that means? Well, If I need to do something, which usually involves creating a script, I try first to do a quick search on Google and see if someone already had this idea.
Looking at the title of the article you might say: Oh, that’s easily done with dbatools, which in fact it is true. However, my use case this time was a bit different than the conventional, because I want to expose that dynamically in my Python/Django Internal tool that exposes SQL Server through API’s, so the need for a TSQL script is imminent.
The goal result that I need is:
|User Name||User Type||Create Date||Roles|
There will be more than 15 sessions with all kinds of flavours, so you experiment a bit of everything 🙂 If you are in the area of Gothenburg I am sure you don’t wanna miss the event!
For me it will be a pleasure to be for my first time in Sweden and have the honor to speak there. I’m really excited! Read the rest of this entry
In my current job as a DBA, one of my missions is making everything as automated as possible and making sure that when things go wrong(trust me, they will), the applications that are using my environment can smoothly continue to run with less intervention possible.
You will make mistakes which is part of the job, learning from those mistakes is what makes you grow. Today I want to share with you a few tips that will make your experience with SSRS Databases and Availability Groups less painful. Read the rest of this entry
One of the capabilities that we do offer to our developers is the ability for themselves to create SQL Server Agent Jobs in our DEV/TEST Environments, so they perform some of their work without the DBA to be involved.
To fullfil this requirement, we grant them the role SQLAgentUserRole, which pretty much does the job. They can create and schedule jobs and execute them. However, latelly one of our DEV’s changed his team and I had to transfer his SQL Agent Jobs to another DEV.
It turns out that when the DEV tried to edit the existing schedule he got the following message: The specified @schedule_id (‘ScheduleIDHere’) does not exist. Read the rest of this entry
On the attempt to always learn something new, I was playing around with Python, the Python-Twitter Package and the Schedule package.
Pretty much I wanted to create a small script where I could every X minutes to connect on twitter and re-tweet some tweets that were using an specific hashtag.
This was what I came up with. Read the rest of this entry