PowerShell

Getting Started With PowerShell on Linux

Getting PowerShell on Linux Well it’s not just an announcement, you can actually get PowerShell on Linux and MacOS right now from GitHub – here! Installing PowerShell Once you’ve downloaded an installation file you can use RPM or apt to install the package. If you’re on a Mac…well just double click on the package! yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm If you’re on Ubuntu, you’ll need a little more stuff read this. Running PowerShell We’ll there’s really not much to that, just type powershell at the command prompt an you’re off and running!

Moving SQL Server data between filegroups – Part 2 – The implementation

In this post we are going to show the implementation of a PowerShell script using SMO to move data between filegroups on SQL Server. This article is the second of our two part series on “Moving SQL Server data between filegroups – Database Structures”, you can find the first article here. The Challenge Looking around on the web, I couldn’t find a solution to the problem of moving data between filegroups that I liked.

Moving SQL Server data between filegroups – Part 1 – Database Structures

Why is moving data between filegroups hard? ****As a consultant its common to walk into a customer site and find databases that are contained in one very large file. For various reasons it can be beneficial to adjust the number a data files for a database. See here. However, in SQL Server moving data from a one file database into a multi-file configuration is a non-trivial task. It’s a two step process, requiring that you add a new filegroup then in the filegroup add your multi-file configuration.