THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » SQL Server » scripts   (RSS)
Showing page 1 of 2 (14 total posts)
  • PowerShell for the DBA: Search the Windows Event Logs for Errors

    This is a very simple script - but it's one I run each morning. It searches the Windows System Event Log for an error condition. You can replace ''System'' here with ''Application'' or ''Security'', or any of the other logs that are created on your Windows Server. This is run at the server, since I have each server check itself and make a file of ...
    Posted to Buck Woody (Weblog) by BuckWoody on August 4, 2010
  • PowerShell and Extended Properties

    I use Extended Properties on databases and their objects all the time. They are a great way to include information about the object – I use them for versioning the database, detailing what a column is used for and so on. They can be a little tricky to set, but it’s really not bad once you learn how.  Ken Simmons, a SQL Server MVP ...
    Posted to Buck Woody (Weblog) by BuckWoody on July 20, 2010
  • Check Script

    Someone contacted me yesterday and said they were getting blocked when they tried to create a FileStream data column type. On investigation, I found they were Mirroring that database – and the two aren’t compatible. Which got me to thinking – it’s probably a good idea to make a “check script” as you investigate tacking on a new feature, column ...
    Posted to Buck Woody (Weblog) by BuckWoody on June 30, 2010
  • Create and Track Your Own License Keys with PowerShell

    SQL Server used to have  cool little tool that would let you track your licenses. Microsoft didn’t use it to limit your system or anything, it was just a place on the server where you could put that this system used this license key. I miss those days – we don’t track that any more, and I want to make sure I’m up to date on my licensing, so I ...
    Posted to Buck Woody (Weblog) by BuckWoody on April 15, 2010
  • List SQL Server Instances using the Registry

    I read this interesting article on using PowerShell and the registry, and thought I would modify his information a bit to list the SQL Server Instances on a box. The interesting thing about listing instances this was is that you can touch remote machines, find the instances when they are off and so on. Anyway, here’s the scriptlet I used to find ...
    Posted to Buck Woody (Weblog) by BuckWoody on March 31, 2010
  • Backup Meta-Data

    I'm working on a PowerShell script to show me the trending durations of my backup activities. The first thing I need is the data, so I looked at the Standard Reports in SQL Server Management Studio, and found a report that suited my needs, so I pulled out the script that it runs and modified it to this T-SQL Script. A few words here - you need ...
    Posted to Buck Woody (Weblog) by BuckWoody on March 30, 2010
  • Open the SQL Server Error Log with PowerShell

    Using the Server Management Objects (SMO) library, you don’t even need to have the SQL Server 2008 PowerShell Provider to read the SQL Server Error Logs – in fact, you can use regular old everyday PowerShell. Keep in mind you will need the SMO libraries – which can be installed separately or by installing the Client Tools from the SQL Server ...
    Posted to Buck Woody (Weblog) by BuckWoody on March 29, 2010
  • PowerShell: Read Excel to Create Inserts

    I’m writing a series of articles on how to migrate “departmental” data into SQL Server. I also hold workshops on the entire process – from discovering that the data exists to the modeling process and then how to design the Extract, Transform and Load (ETL) process. Finally I write about (and teach) a few methods on actually moving the data. One ...
    Posted to Buck Woody (Weblog) by BuckWoody on March 18, 2010
  • PowerShell Version Two – Get Continuous Perf Counters

    In version 2.0 of PowerShell, you can now use a direct command-let (get-Counter) to get at the Performance Monitor counters. For instance, to show the current value of the Processor Percent Time, use this command:  Get-Counter '\Processor(*)\% Processor Time'    The interesting part of get-Counter is that you can add a ...
    Posted to Buck Woody (Weblog) by BuckWoody on February 25, 2010
  • Encrypt it in .NET/Decrypt it on SQL Server?

    A common question on the newsgroups is ''how do you encrypt data in a .NET [or other] client application and then decrypt it on SQL Server [or vice versa]?'' I actually ran down my list of answers to someone who asked this in the newsgroups a few weeks ago. I won’t get into the details, but the answers all pretty much say the same thing -- ...
    Posted to Michael Coles: Sergeant SQL (Weblog) by Mike C on January 29, 2010
1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement