Quantcast
Channel: sqlkitty
Browsing latest articles
Browse All 36 View Live

Image may be NSFW.
Clik here to view.

How to find free space in Azure PosgreSQL

Photo by NASA on Unsplash I wanted to figure out how big (or approximately how big) my dump file would be. In QA, I have (relatively) large dbs (compared to prod). Enter the pgstattuple extension to...

View Article


Image may be NSFW.
Clik here to view.

How I Migrated to Azure PostgreSQL Flex from Single Server

Image by Michaela from Pixabay I did a couple of posts previously on dumping/restoring Azure PostgreSQL databases and also using the Azure migration tool. I had to ultimately do a combo of those...

View Article


Checking table size in Postgres

It’s easy to do with this query. That’s all I have to say on this topic for now. SELECT table_schema || '.' || table_name AS full_table_name, pg_size_pretty(pg_total_relation_size('"' || table_schema...

View Article

Image may be NSFW.
Clik here to view.

Drop roles in Postgres

Photo by ANIRUDH on Unsplash Table of ContentsIf it owns somethingRoles granted to a roleGrants at the DB and schema levelObject level grants You can’t just exec DROP ROLE your_role_name; if it’s...

View Article

Image may be NSFW.
Clik here to view.

Query editor for Azure SQL DB

I keep losing track of this wondering where it went. You have to access it at the database level. Adding this post to remind me for later. This came in very handy when my home internet went down and I...

View Article


Image may be NSFW.
Clik here to view.

PowerShell (and T-SQL) and Elastic Jobs

Photo by Kira Severinova on Unsplash I’ve covered how to create Elastic Jobs in the portal (this one is important to read if you aren’t familiar with elastic jobs already), with Terraform, and with...

View Article

Image may be NSFW.
Clik here to view.

Migrating from Azure PG Single Server to Flex with Azure VM and pg_dump/restore

Photo by Natalie Wagner on Unsplash This is more complicated than using the Azure Migration method, but because it’s maxed out on resources for the last week in the east regions (and possibly...

View Article

Image may be NSFW.
Clik here to view.

Quickly Comment Out Code Using Win + / or Cmd + /

Commenting out code is quick and easy with a keyboard shortcut: Win + / on Windows or Command + / on Mac. You can place your cursor anywhere on the line that you want to comment out, or you can select...

View Article


Image may be NSFW.
Clik here to view.

TSQL Tuesday #184: Mentoring and Sponsorship

Photo by Riccardo Annandale on Unsplash Thank you to Deborah Melkin for hosting TSQL Tuesday this month! I’ve always considered mentoring and sponsorship very structured. Now, I wonder if they’re also...

View Article


Image may be NSFW.
Clik here to view.

Save Azure PostgreSQL Backup to Storage

Photo by Andre Taissin on Unsplash This may or may not be helpful in the long term, but since I’m doing it to be super cautious, I figured I would blog about it. We migrated to Flex last week, and to...

View Article
Browsing latest articles
Browse All 36 View Live