Welcome to MSDN Blogs
Sign in
|
Join
|
Help
Carpe Datum
Data Flotsam and Jetsam
This Blog
About
Email
Syndication
RSS 2.0
Atom 1.0
Search
News
Having trouble with a feed from this site? Post a reply to any blog entry.
Tags
Administration
Agent
Best Practices
Book Review
Business Intelligence
Career
Certifications
Computing
Conferences
Connections
Customer Contact
DBA
Design
Developer
Development
Disaster Recovery
Documentation
Downloads
Encryption
Error Codes
Help
Indexes
Latest Version
Link Lists
Links
Locks
Longhorn
Maintenance
Maintenance Plans
Management
Metadata
Microsoft
Microsoft Update
MSDN
PASS
PBM
Performance Tuning
Personal
Planning
Podcast
Policy Based Management
PowerShell
Process
Questions
Quote Of The Day
Rant
Real World DBA
SCOM
Scripts
Searching
Security
Service Packs
SOA
SQL Server
SQL Server 2000
SQL Server 2008
SQL Server Documentation
SQL Server Downloads
SQL Server Management Studio
SSIS
SSMS
Standard Reports
Strings
Support
System Center Operations Manager
Technet
Testing
Tips
T-SQL
Tutorials
Upgrades
Virtualization
Walkthroughs
Web
Windows 2008
Recent Posts
Quote of the Day – On Having a Purpose
Using Perfmon with SQL Server – Part Two
Using Perfmon with SQL Server – Part One
Channeling Bruce Lee: Tuning without Tuning
Color Me Corrected – Will the REAL sysobjects please stand up?
Archives
November 2009 (15)
October 2009 (23)
September 2009 (22)
August 2009 (21)
July 2009 (23)
June 2009 (23)
May 2009 (21)
April 2009 (22)
March 2009 (23)
February 2009 (20)
January 2009 (22)
December 2008 (23)
November 2008 (19)
October 2008 (24)
September 2008 (22)
August 2008 (22)
July 2008 (21)
June 2008 (21)
May 2008 (21)
April 2008 (25)
March 2008 (23)
February 2008 (22)
January 2008 (21)
December 2007 (15)
November 2007 (18)
October 2007 (23)
September 2007 (21)
August 2007 (21)
July 2007 (1)
June 2007 (3)
May 2007 (3)
April 2007 (3)
March 2007 (2)
February 2007 (3)
Browse by Tags
All Tags
»
Scripts
Administration
Best Practices
Computing
DBA
Design
Developer
Development
Disaster Recovery
Documentation
Downloads
Help
Indexes
Latest Version
Links
Maintenance
Maintenance Plans
Management
Metadata
Microsoft
Microsoft Update
Performance Tuning
Policy Based Management
PowerShell
Process
Questions
Rant
Security
SQL Server
SQL Server 2008
SQL Server Downloads
SQL Server Management Studio
SSIS
SSMS
Standard Reports
Strings
Testing
Tips
T-SQL
Tutorials
Walkthroughs
Web
Thursday, November 19, 2009 7:17 AM
Using Perfmon with SQL Server – Part Two
Yesterday I posted a header from a script that shows you some links for how to use “Logman”, a Windows command-line utility that can automate your collection of Windows Performance Monitor counters. Towards the bottom, you can see the logman command I
Posted by
Buck Woody
|
1 Comments
Filed under:
T-SQL
,
Walkthroughs
,
DBA
,
Scripts
,
SQL Server
,
Performance Tuning
Thursday, November 12, 2009 7:12 AM
Store XML Document as Binary, Read as XML
I had an interesting question the other day, so I thought I would share both the question and the answer. We had an older application that had stored an XML document in a table as a binary data type column. I know, I know – we’ve had an XML data type
Posted by
Buck Woody
|
2 Comments
Filed under:
Scripts
,
SQL Server
,
Tips
Wednesday, October 28, 2009 8:13 AM
Templates for New Query Window
When I’m in SQL Server Management Studio and I click the “New Query” button, my Query Window comes up like this: /* <ScriptFileName, SYSNAME, ScriptFileName>.sql Purpose: <Purpose, SYSNAME, Purpose> Author: <Author, SYSNAME, Buck Woody>
Posted by
Buck Woody
|
0 Comments
Filed under:
SSMS
,
Developer
,
DBA
,
Scripts
,
Development
,
SQL Server
,
Administration
,
Design
,
SQL Server Management Studio
,
Tips
Wednesday, September 02, 2009 7:27 AM
T-SQL Prettifiers
OK, I don't think that's even a word, but the synonyms (can a non-word have a synonym?) are code beautifiers, sql formatters, etc. The basic idea is that it's a program that re-formats the text in a Transact-SQL statement using a standard set of rules.
Posted by
Buck Woody
|
0 Comments
Filed under:
T-SQL
,
Web
,
SSMS
,
Developer
,
DBA
,
Scripts
,
Development
,
SQL Server
,
SQL Server Management Studio
,
Rant
,
Tips
Wednesday, August 05, 2009 7:45 AM
The Importance of a Test System
Most of us have three environments in our organizations: Development, Staging, and Production. But I don't count Staging as a test system. Sure, I use it to do an integration test for code before it goes to the users, but that's not the only kind of testing
Posted by
Buck Woody
|
3 Comments
Filed under:
Developer
,
DBA
,
Scripts
,
SQL Server
,
Administration
,
Tips
,
Best Practices
Wednesday, July 29, 2009 8:06 AM
Commenting your Code
You should always add descriptive comments to any code that will live longer than a single event. It's useful not only for the other unfortunate souls blessed with your code, but for yourself, years later, when you say "what was I thinking here?"
Posted by
Buck Woody
|
7 Comments
Filed under:
T-SQL
,
Documentation
,
Developer
,
DBA
,
Scripts
,
SQL Server
,
Design
,
Rant
,
Tips
,
Best Practices
Thursday, July 02, 2009 7:27 AM
PowerShell and SQL Server: Script all Tables
This is a script that I found/put together/re-arranged that will script out all of the tables from a database - in this case, Adventureworks2008. You need to change the BWOODY1 part to the name of your server, and the SQL2K8 part to your Instance name.
Posted by
Buck Woody
|
0 Comments
Filed under:
Scripts
,
SQL Server
,
PowerShell
Thursday, June 25, 2009 8:16 AM
Use PowerShell to Backup All User Databases
This script will back up all user databases - you need to change the BWOODY1\SQL2K8 part to your server\instance name, and of course, you should only run this on a test system until you completely understand it. Unfortunately, the SQL Server PowerShell
Posted by
Buck Woody
|
4 Comments
Filed under:
DBA
,
Scripts
,
SQL Server
,
PowerShell
,
Tips
Wednesday, June 10, 2009 7:42 AM
Read the SQL Server Error Log with PowerShell
This script uses a native client call, so you can use it on any machine that has PowerShell installed along with the SQL Server client software. As always, only run this script on a test system until you understand what it does, and of course you'll need
Posted by
Buck Woody
|
3 Comments
Filed under:
DBA
,
Scripts
,
SQL Server
,
PowerShell
,
Tips
Wednesday, May 20, 2009 8:25 AM
A Template for Setting and Reading Extended Properties
In the SQLCMS project, I show an example of some "base tables" that you can create for the system. Whenever I create a database, or database object, I make use of a feature that's been around for quite awhile - Extended Properties. You can set and read
Posted by
Buck Woody
|
1 Comments
Filed under:
T-SQL
,
SSMS
,
Developer
,
DBA
,
Scripts
,
SQL Server
,
SQL Server Management Studio
Wednesday, May 13, 2009 7:52 AM
Who is Active - a replacement for sp_who2
Most every DBA I know uses sp_who2, an undocumented stored procedure that shows locking, blocking, who is on, what they are doing and so on. At TechEd on Monday (I could only go for one day this time) I met up with my friend Adam Mechanic - a SQL Server
Posted by
Buck Woody
|
1 Comments
Filed under:
Web
,
DBA
,
Scripts
,
SQL Server
,
Administration
Tuesday, May 05, 2009 9:47 AM
T-SQL to Find Physical and Logical Processors
I ran into a licensing question the other day on Physical versus Logical Processors. Happily, Microsoft only charges you for Physical sockets - which you can find with this query: SELECT cpu_count / hyperthread_ratio AS PhysicalCPUs FROM sys.dm_os_sys_info
Posted by
Buck Woody
|
1 Comments
Filed under:
T-SQL
,
DBA
,
Scripts
,
Metadata
,
SQL Server
,
Administration
,
Tips
Monday, April 27, 2009 6:50 AM
Quickly Locate Text in a Query Window in SSMS
Wow - long title. Anyway, my good friend Bill Ramos and I were chatting just the other day. He's a the guy at Microsoft that took my old responsibilities for SQL Server Management Studio (SSMS), and we were swapping tips and tricks. He showed me
Posted by
Buck Woody
|
4 Comments
Filed under:
SSMS
,
Developer
,
DBA
,
Scripts
,
SQL Server Management Studio
,
Tips
Monday, April 20, 2009 7:54 AM
Listing the Central Management Servers Programmatically
I don't normally advocate hitting the system tables in any database with direct queries, preferring instead to use views or functions that the vendor provides. But so far I haven't been able to find the view or function that would return the list of servers
Posted by
Buck Woody
|
1 Comments
Filed under:
T-SQL
,
SSMS
,
DBA
,
Management
,
Scripts
,
Metadata
,
Development
,
SQL Server
,
Maintenance
,
SQL Server Management Studio
,
SQL Server 2008
,
Tips
Monday, April 13, 2009 8:57 AM
Run a SQL Server Command from PowerShell without the SQL Server Provider
Some folks don't have SQL Server 2008 installed - shame on you! If you're in that sad state, you can still run a query against a SQL Server. You will still need the client connection software installed on your system - you'll have that with any 2005 edition
Posted by
Buck Woody
|
1 Comments
Filed under:
Scripts
,
PowerShell
More Posts
Next page »