Advertisements

Archive

Archive for the ‘Powershell’ Category

PowerShell for Searching Database Objects Part I‏I

February 26, 2013 4 comments

In my last article we seen PowerShell for Searching Database Objects Part I. If you look at the actual PowerShell Script in that article it looks very complicated. In this article you will find another two ways to search databases objects with PowerShell with simple(understandable) script. Read more…

Advertisements

PowerShell for Searching Database Objects Part I

February 22, 2013 3 comments

Here is ProwerShell 3.0 Script for searching database object based on their names. We will use AdventureWorksLT2012 database, and will look for SQL Server objects name containing “user” for table level objects only explicitly excluding Federations, because this throws an error. Basically we are going to achieve output below SQL query with ProwerShell Script. Read more…

PowerShell for Creating a Database

February 19, 2013 6 comments

This script explains creating a MS SQL Server database with default properties using PowerShell V3.0. In this script we are going to create a database called “PSDB”, by assuming that this database does not yet exist in current instance. Read more…

PowerShell and SQL Server Works Together

February 18, 2013 5 comments

Before I write anything about PowerShell and MS SQL Server, we need to understand few important concepts and terminology which will help us to identify that PowerShell and MS SQL Server works together. Read more…

PowerShell V3 What’s New?

February 15, 2013 3 comments

In this article I’m going to list some of the notable features introduced in PowerShell V3.0

  • WorkFlows

PowerShell V3 introduces Windows PowerShell Workflow (PSWF), which helps automate the distribution, orchestration, and completion of multi-computer tasks, freeing users and administrators to focus on higher-level tasks. PSWF leverages Windows Workflow Foundation 4.0 for the declarative framework, but using familiar PowerShell syntax and constructs. Read more…

Categories: Powershell Tags: ,

PowerShell Script to Send Email (multiple recipients)

February 15, 2013 14 comments

In this article I will try to wrap how to PowerShell to manage your SQL Server Notifications. And this is very much regular scenario for most of the SQL Server DBA’s to generate notifications when issues arise. There are many ways that we can handle these notifications, but one of the simplest and most reliable and the most common way is email notifications. Read more…

PowerShell script to backup a database and restore on other server.

December 16, 2012 18 comments

Many a times as a DBA when we need to refresh our QA or Dev environment with Production environment, we need to have a full backup of Production database and then manually we need to restore them in other environments. The following is  a simple power shell script to just take a full backup with copy only option and then restore it on other server. Read more…

%d bloggers like this: