To view your SQL Server (or SSRS) reports using PowerShell, you can either use
- plain browser + URL string combo
- Report Viewer
- Web Services
The script below shows the first two options.
If you are going to go with Report Viewer (and personally, that’s my preference), you will need to download the ReportViewer redistributable package
I did a presentation today for VANPASS on PowerShell and SQL Server – thank you to those who attended! It was a great lively crowd 🙂 Thanks to Idera too – for the freebies – and to Black Ninja Software for the pizza and pop!
Here are the files as promised: VANPASS – SQL Server and PowerShell – Donabel Santos
If you have the slightest interest in PowerShell, and you’re keen on learning more about it, I strongly recommend you download this book:
Mastering PowerShell (from PowerShell.com and written by Dr. Tobias Weltner)
It is an awesome, well written 567 page book that covers PowerShell through and through. Here are the chapters:
- The PowerShell Console
- Interactive PowerShell
- Arrays and Hashtables
- The PowerShell Pipeline
- Using Objects
- Finding and Avoiding Errors
- Command Discovery and Scriptblocks
- Text and Regular Expressions
- The File System
- The Registry
- Processes, Services, Event Logs
- Windows Management Instrumentation
- User Management
- Your Own Cmdlets and Extensions
Assume this is your XML snippet
[sql collapse=”false” firstline=”1″ gutter=”true” smarttabs=”true” tabsize=”4″ toolbar=”true”]
DECLARE @authorsXML XML
SET @authorsXML = ‘
<Street>10932 Bigge Rd.</Street>
Note that the examples below show how you can manipulate XML nodes – but most operations require singleton values. Ie, the changes must affect one and only one node. Thus in most the examples we specify the index of the node we want to target.
[sql collapse=”false” firstline=”1″ gutter=”false” smarttabs=”true” tabsize=”4″ toolbar=”false”]
which means we are only targetting the first instance of LastName under the Author node. If you need to do a mass update, you may need to use a cursor.
One of the bloggers I follow is Brent Ozar. I tell you I’m a fan. I like the way he writes his stuff.
Anyway, he blogged about The Problem With SQL Server Training Today, and The Answer to SQL Server Training Problems a week or so ago. And this is the answer – SQLServerPedia – SQL Server Knowledge and Advice Straight from the Experts.
So in between giving out candies to cute little Indiana Joneses, pirates of the Caribbean, vampires and dead cheerleaders, I’ve been soaking in SQLServerPedia (geeky ‘no?). So far, so good. I’ll be a frequent flyer.
PS – and if you’re a DBA, you’ll find great laughs in this post : Somebody Created a Halloween Monster #SQLputdowns
Leaning how to manipulate XML in SQL Server 2005? You have to read
Jacob Sebastian’s XQuery Labs (http://www.sqlserverandxml.com/search/label/XQuery%20Lab)
Jacob has done a wonderful job compiling common how-to’s when working with SQLXML. Must read for anyone wanting to move faster with SQLXML.
Update (March 2009):
Jacob Sebastian has moved to : http://blog.beyondrelational.com/