SQLDevTools Version 1.0

Project Description
Series of PowerShell Functions to assist in the scripting and rebuilding of SQL Server objects through automation.

SQLDevTools PowerShell Module is initially a new set of 35 functions combining SMO, T-SQL, and PowerShell scripts to assist you in scripting out most of your table objects. At the same time, you can use these scripted objects to rebuild tables in another database. In this release, you can only rebuild table(s) (with Data) without changing names using the Test-TSQLCopyTable function. New function added Test-TSQLCopyToAnotherSQLInstance, use to script/create table(s) on another SQL Instance with different tablename.

Here's the list of the available 44 functions:

Get-MSSQLVersion (fixed - 06/20/2011)
Get-TSQLTableColumns
Get-TSQLTableConstraints
Get-TSQLTableDFConstraints
Get-TSQLTableForeignKeys
Get-TSQLTableIdentity (chg - 11/14/2011)
Get-TSQLTableIndexes
Get-TSQLTableRecordCount (fixed - 06/06/2011)
Get-TSQLTableTriggers (fixed - 06/06/2011)
Test-TSQLCopyTable
Write-TSQLScriptCKConstraint
Write-TSQLScriptColumn2Identity (deleted - 06/06/2011)_
Write-TSQLScriptCreatedbSchema
Write-TSQLScriptDFConstraint (updated - 06/06/2011)
Write-TSQLScriptForeignKey
Write-TSQLScriptIndex (fixed - 06/06/2011)_
Write-TSQLScriptInsertSelect (major fixed - 11/154/2011)
Write-TSQLScriptTable

New functions added (06/06/2011):
Rename-TSQLScriptedTableName
Rename-TSQLScriptedTableIndexes
Get-TSQLUserDefinedDataTypes
Get-TSQLXmlSchemaCollections
Get-TSQLUserDefinedFunctions
Write-TSQLScriptXmlSchemaCollections
Write-TSQLScriptUserDefinedFunctions
Write-TSQLScriptUserDefinedDataTypes

New functions added (06/20/2011):
Test-TSQLCopyToAnotherSQLInstance(fixed: 11/15/2011)_

New functions added (07/25-08/12/2011):
Clear-TSQLTruncateAllTables (updated: 09/05/2011)
Reset-TSQLDatabaseAllProcesses
Get-TSQLUsersStoredProcedures
Write-TSQLUsersStoredProcedures
Get-TSQLUsersDatabaseViews
Write-TSQLUsersDatabaseViews
Get-TSQLDatabaseRecoveryModel
Set-TSQLDatabaseRecoveryModel

New functions added (09/05/2011):
Get-TSQLDatabaseTables

New function added (10/19/2011):
Write-TSQLScriptUserStoredProcedure

Also, in this release I included 6 other functions, that I consider "helper functions". Two of them are use with the Idera's Virtual Database product: a create New Virtual Database, and a Remove an Existing Virtual Database. Then, 4 other helper functions for displaying results, and displaying PowerShell objects members to: gridview, or HTML. Here the list of these 4 functions:

New-IderaVirtualDB
Remove-IderaVirtualDB
Show-AnyObject2Grid
Show-AnyObject2Html
Show-Member2Grid
Show-Member2Html
Show-MsgBox

Module Requirements:

This version of this module, it's required that you have SQL Server 2008 (or above) installed in your machine. There will be no installer. This module was build with SAPIEN's PrimalForms 2011.
Author: Maximo Trinidad
Blog site: http://www.maxtblog.com

Last edited Nov 15, 2011 at 6:30 PM by MaxTrinidad, version 21