Category Archives: Scripts
Olá pessoal, tudo bom com vocês?
Nos artigos anteriores demos inicio a nossa sequencia de vídeos sobre o dbatools, onde realizamos a instalação do Visual Studio Code e consequentemente instalamos o módulo do dbatools. Abordamos também nossos primeiros comandos: Get-DbaLogin e Export-DbaLogin.
Pois bem, aprofundando um pouco mais em todas as áreas do dbatools, vamos agora abordar um tópico bastante importante: A restauração de um banco de dados.
Uma das tarefas do administrador de banco de dados recorrentes é realizar a restauração, ou na linguagem técnica “restore” de um banco, seja a mesma sobrescrever um banco já existente, ou até mesmo restaurar um único banco para várias instancias em servidores diferentes.
Como sempre o módulo do dbatools possui comandos que nos ajudam e muito nessa tarefa. Aconselho vocês a assistirem o vídeo abaixo e aprender um pouco mais sobre esse poderoso módulo para administração de SQL Server.
Como sempre peço por aqui e nos vídeos, fico sempre aguardando os comentários, sugestões, e até mesmo dicas de vídeos que gostariam de ver por aqui.
Se inscrevam também no meu canal do Youtube para sempre receberem as notificações de vídeos novos.
Um grande abraço para vocês e até o próximo vídeo!
Data Platform MVP
Olá pessoal, tudo bom com vocês?
Nos artigos anteriores demos inicio a nossa sequencia de vídeos sobre o dbatools, onde realizamos a instalação do Visual Studio Code e consequentemente instalamos o módulo do dbatools.
Nesse vídeo é onde de fato vamos abortar os primeiros comandos que compoem esse maravilhoso módulo que são: Get-DbaLogin e Export-DbaLogin. Vocês verão que através de scripts simples podem automatizar algumas rotinas que farão a vida de um administrador de banco de dados mais simples.
Nada do que vou mostrar no vídeo é complexo de ser feito, você precisa apenas pensar no problema a ser resolvido, e é isso mesmo a minha abordagem.
Espero que vocês gostem do conteúdo que estão prestes a assistir.
Como sempre enfatizo, fico aguardando os comentários de vocês, sejam com sugestões de vídeos ou até mesmo críticas.
Abraços e até o próximo vídeo.
Data Platform MVP
I just wanted to share with you some cool scripts in Python that I have been working on. I don’t think they are perfect, but as I am not seeing anything similar to that on the internet I decided to share with you.
Secret Server as the company states in their website.
Secret Server is a clear pick for Privileged Account Management. Competitive pricing, rapid deployment, and short time to value. supporting a variety of complex and specialized enterprise use cases
Secret Server is really helpfull for sharing credentials among teams, checking-in and out from secrets, automatic rotation of passwords, etc..
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
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.
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
Probably you were a bit curious about it and decided to click here, right? This is a very recurrent question on Microsoft forums, where people who maybe by mistake encrypted all of the stored procedures, or maybe you support a 3rd party application and there is an particular stored procedure killing the performance of your server and you just wanna know what the same is doing?
Independent of what you want to do, let me show you here how can you manage to see the content of an encrypted procedure. Read the rest of this entry
Those days at work I had to remove a bunch of databases from the Availability Groups and later drop them from the primary and secondary replicas. I know I could do the click, click and drop thing, but why not PowerShell? Read the rest of this entry
Last week I was helping an Application Admin to Synchronize files and folders between Source and Destination Servers. The challenge was because some folders had really long hierarchies, so you could imagine something like this.
I would say that doing this for some files it is really ok, but for my case we are talking about of 10GB of data and around 4K folders in the root level. Basically, this was the solution that I was able to come up.
The script in in the Github link below. Read the rest of this entry