Category Archives: Database

SQL server, MySQL, PostgreSQL, MariaDB, MongoDB, SQLite

Vibe Coding Database Application Example Using Python and VS Code and AI

With the popularity of the Vibe Coding (with AI) methodology I though we could try creating a very simple Database application that anyone can use from a local browser. Most of the articles I found were using javascript frameworks (Node, React, Angular, or Vue.js) to build the application. Lets try… Read more »

Check If SQL Table Exists Using Powershell

Another common request for DBA’s is to search for or validate that certain tables or other objects exist and in what database. This post is a follow-up to our “Check If Database Exists Using Powershell” post where we search look for a database remotely using the “invoke-sqlcmd” commandlet. Note: This… Read more »

Stored Procedure With Input And Output Parameters In SQL

This post is for the beginner to understand how to write and modify a SQL stored procedure with parameters and variables. We will try to include some “why & how” answers that many stored procedure examples leave out. Procedures can become very complicated so we will keep it simple and… Read more »

Get The First Day Of The Month From 3 Months Ago Using T-SQL

Dealing with dates in SQL Server is a critical skill and required when developing reports that depend on the Date, Day and Hour to be accurate. This includes logically moving through the year or bracketing results inside a month in your code. Returning the beginning of the month using SQL… Read more »

How To Generate Random Strings in SQL | GUID and Passwords

Random strings, characters and ID’s are used all the time in development and especially in Database work where some data needs to be unique or uniquely identified. This example code was written many years ago to generate passwords in SQL 2008 with certain complexities for automation purposes using the RAND()… Read more »

SQL Failover Cluster Unattended Install with Multiple Instances Advanced Method Completion Part 2

This is the continuation for using the advanced methods to install a SQL cluster instance unattended. In SQL Failover Cluster Part 1 we created a Configuration file using the wizard and then modified the file to allow a Silent or Quiet unattended installation. This “prepare” install is only used to… Read more »

SQL Failover Cluster Unattended Install with Multiple Instances Using The Advanced Prepare Method Part 1

This is an advance process that allows us to prepare a cluster node or likely multiple nodes quickly. We will use the configuration file feature and install the SQL services and instance level resources on each node so they are exactly the same. Then we fail all of the drives… Read more »

How to Connect SQL Server in Python | Username and Password

For the Python experienced Developers & DBA’s I thought I would include an article about connecting to SQL server similar to the SQL server powershell version we wrote recently. I tested this code using PyCharm and a new virtual environment that did not have pyodbc. To connect to SQL Server… Read more »