Posts for: #Scripting

Creating Multiple Files with Content Using PowerShell

Creating Multiple Files with Content Using PowerShell

This post aims to explain a straight forward yet effective PowerShell functionality which can help the user in creating more than one file with specified content.

This can be useful for developers, system administrators or any user who wishes to generate files quickly for testing purposes or something else.

The PowerShell Function

Here’s a PowerShell function that allows you to create a specified number of files in a folder, with the option to include custom content.

Read more →

Find columns with special characters

Problem

im special

Imagine a database where you want to know how many times a certain column contains a special character. The reason I had to do this was that I needed to know the impact of an export interface that wasn’t working properly with special characters.

But as lazy as I am when it comes to doing repetitive tasks, I had to find a way could easily get all columns with special characters in a data set without a lot of hassle.

Read more →

Split large data file into smaller data files

Problem

split_large_databasefile

The business uses a database that is 350 GB database in size and has only one data file and one transaction log file. The previous DBA didn’t increase the amount of data files which lead to a large data file. Due to the size of the data file, I got into trouble with the performance, and restoring the database wasn’t a walk in the park either. So how can split a large data file into smaller data files?

Read more →