Foto%20quadrada%20per%20silvrback_large

Josep

Clean coding with Write-Verbose

It’s a good practise to use the Write-Verbose,Write-Debug and other about_CommonParameters when writing functions because it helps you to write clean code in a very integrated way with Powershell. One of its main benefits is for debugging and verbosing without needing to modify your code.

I’ll focus on the usage of Write-Verbose. The . . .

Read More

April 19, 2016

Powershell Get-ChildItem examples

I really like Powershell because you can do a lot of tasks very easily and it’s very integrated with Windows and .NET framework. So, it’s powerfull.

Get-ChildItem it’s a versatile and useful cmdlet that gets the items and child items in one or more specified locations. In this post I write some code examples that I hope you find it . . .

Read More

April 19, 2016

pg_terminate_backend for non-superusers

The problem

Last week I had to give the permission to one user to kill PostgreSQL connections in a development environment, but I found that pg_terminate_backend and pg_cancel_backend functions can only be executed by a superuser and I didn’t want to give such privileges so I started looking for a solution and at the end I . . .

Read More

April 19, 2016

Starting the blog!

This is the very first post of a blog where I will write the DBA stuff I have to work with every day, the DBA daily stuff!

My main background is in Microsoft SQL Server, but I’m also working with PostgreSQL and Oracle.

I’m also using Powershell for scripting.

I hope you enjoy it and find it useful!

Read More

April 19, 2016

Archive