Tag Archive: SQLPSX

Quickly Script Out Replication Redux

Dave Levy (Blog|Twitter) posted a script in a blog post in which he uses a bit of SQL PowerShell Extensions (SQLPSX) and some Replication Management Objects (RMO) to script out SQL Server replication.  Overall Dave’s script is a good use of PowerShell and RMO. Scripting out objects is much easier to handle in PowerShell than a T-SQL…

SQLIse A PowerShell SQL Server Query Tools Gets an Update

After the first release of SQLIse (“SQL Ice”)–a basic IDE for T-SQL that includes ability to edit, execute, parse, format SQL code from within PowerShell ISE, several people contacted me to help add new features. The result is SQL Server PowerShell Extensions (SQLPSX) 2.2 with many enhancements to SQLIse… SQLIse Features Offline parsing of T-SQL…

T-SQL Tuesday #005: SSIS Reporting

Automating SQL Server Integration Services (SSIS) administration through PowerShell is very different than writing scripts against the core database engine. Once you move outside the core database engine the .NET classes for working with SQL Server features like SQL Server Integration Services vary greatly in the way they are implemented. The core database engine has…

Parsing SQL for Table Names

Visual Studio Team System 2008 Database Edition (VSDB) ships with a .NET class for parsing T-SQL. I’ve previously blogged about producing a Stored Procedure Call Tree and even built the Test-SqlScript and Out-SqlScript cmdlets included in SQL Server PowerShell Extensions using the assemblies. Recently I’ve discovered another useful SQL parser called MacroScope that’s worthy of…

SQLIse A Powershell Based SQL Server Query Tool

SQL Server Powershell Powershell Extensions (SQLPSX) has been updated to version 2.1. The most notable change is the addition of a Powershell Integrated Scripting Editor (ISE) module called SQLIse (pronounced “SQL Ice”). The module provides a basic IDE for T-SQL that includes the ability to edit, execute, parse and format SQL code from within Powershell…

The Powershell V1 to V2 Conversion

This post is about my experience converting the CodePlex project, SQL Server Powershell Extensions (SQLPSX) Powershell V1 function libraries into PowerShell V2 Advanced functions within modules. In order to provide context for people reading this blog post a quick timeline is needed: Powershell V1 was released in November 2006 SQLPS, the SQL Server Powershell host that ships with SQL…

Finding Invalid SQL Logins

As many of you know the system stored procedure sp_validatelogins is used for finding invalid logins. Although sp_validatelogins is useful there’s one problem – the output isn’t always accurate. You see when you add a a Windows account to SQL Server the SID as well as the domain (or computer name) slash account name are stored in…

Stored Procedure Call Tree

I was reading a post by Linchi Shea in which he demonstrates a Perl script to Find the complete call tree for a stored procedure and thought, how would I do this in PowerShell? Before we dissect a PowerShell approach, let’s look at a basic Perl approach. In Perl you typically find a command-line tool…

SQL Saturday #21

I presented a 1 hr session at SQL Saturday #21 session SQL Server PowerShell Extensions: In this sesssion we will look at automating common DBA tasks through Powershell. An overview of the CodePlex project SQL Serer Powershell Extensions will be provided. Specific topics covered include PowerGUI, SQL Server security/permissions reporting, SSIS administration, replication and agent…

External MAML Help Files

One of the really handy improvevements in Powershell V2 is around creating help information for your script users. I often find myself having to read through script and function definitions to figure out how to use them (and this is for scripts I write!), which becomes a real pain as your functions libraries grow. Starting in version 2 we can use…