Browse by Tags

Tagged Content List
  • Blog Post: PowerShell Tips & Tricks: Getting more detailed error information from PowerShell

    Allen White wrote this handy blogpost on how to handle error message and get more information out of an error record: http://sqlblog.com/blogs/allen_white/archive/2009/06/08/handling-errors-in-powershell.aspx There is an addtional method to get more information available. I found myself sending...
  • Blog Post: Talking about SQLPS (SQL Server Powershell extensions) on Runas Radio

    I was recently interviewed on RunAs Radio on the new Powershell extensions that we developed for SQL Server 2008. If you want to learn more about SQL Server Powershell download the podcast here : http://www.runasradio.com/default.aspx?showNum=75 If you listened to it then please post your feedback...
  • Blog Post: What? No cmdlets? -- SQL Server Powershell

    When you start using the SQL Server Powershell extensions, you will find there are not a whole lot of cmdlets. The expectation is indeed that Powershell support means: cmdlets for every administrative operation you can perform. Did we miss something here? Nope, this is by design. We do intend to ship...
  • Blog Post: Some background on the use of minishells, such as SQLPS

    Jeffrey Snover posted a very clear article about minishells and SQL Server's use of it: http://blogs.msdn.com/powershell/archive/2008/06/23/sql-minishells.aspx Jeffrey is Powershell's Architect, well respected in the Powershell community, and it's good to read about his perspective on this.
  • Blog Post: Evaluating SQL Server Policies through Powershell

    I found this ping-back on my previous blog post which gives a good overview of one very useful cmdlet that we ship with the Powershell extensions that SQL Server 2008 will deliver. A very helpful article one of the SQL Server MVPs, Lara Rubbelke , on the use of Invoke-PolicyEvaluation : http://sqlblog...
  • Blog Post: SQL Server Powershell is here!

    I am very excited that SQL Server will ship with a pretty solid first release of Powershell extensions with SQL Server 2008. The SQL Server Powershell extensions deliver on a vision that we’ll expand on in the next releases to come. So what’s in this release of SQL Server Powershell? - SQLPS –...
  • Blog Post: How to change the SQL Server password programmatically

    Every now and the question comes up how to programmatically modify the service account or password of SQL Server. There basically two ways to accomplish this, using SMO, or WMI. This article shows you how to use WMI and VBScript to accomplish this task. There are a couple of things you need to...
  • Blog Post: Add oil to fire: SMO and Monad -- a flammable combination

    Euan pointed me to an interesting article about the use of Monad together with SMO . Those who know me well, know I am somewhat of a scripting biggot and still install Cygwin on all of my boxes as I cannot live without bash, awk, perk, sed, expr and the various other UNIX tools that I have used over...
  • Blog Post: SQL Server 2005 -- it's a wrap; but wait -- it's just the beginning!

    I'm sure there are lots of coworkers blogging about this. We're done with SQL Server 2005 and it's a very interesting and good feeling. Having worked 5 year on the project, many long days, many weekends, having to fight many battles, and at the same time giving an incredible amount of attention to the...
  • Blog Post: SMO Samples Galore

    With much of the SQL Server 2005 devcelopment behind us, I am starting to have some more time to post some SMO samples . Most of these are inspired on questions in the beta newsgroups or the SMO/DMO forum . Additionally, SQL Server 2005 ships with a pretty wide variety of samples. In fact, there are...
  • Blog Post: SMO Sample: Which SQL Server version is supported by the property?

    Purpose of sample: List metadata information about SMO object properties SMO's object model is different from DMO in one important way: DMO introduced the '2' (like Database2) objects in order to add SQL Server 2000 support. SMO objects are hybrid in that perspective, as these objects morph or limit...
  • Blog Post: SMO Sample: Create and Start a Job

    Purpose of sample: Create simple job and start the job after creation. Server svr = new Server (instance); JobServer agent = svr.JobServer; if (agent.Jobs.Contains( "New Smo Job" )) { agent.Jobs[ "New Smo Job" ].Drop(); } Job j = new Job (agent, "New Smo Job" ); JobStep js = new JobStep ...
  • Blog Post: SMO Sample: Backup database to Mirrors

    Purpose of sample: Backup database to various mirrors Server svr = new Server ( ); Backup b = new Backup (); b.BackupSetDescription = "Set description"; b.Action = BackupActionType .Database; b.BackupSetName = "B ackup set #1"; b.Database = "msdb" ; b.MediaDescription = "Media description" ;...
  • Blog Post: SMO Sample: Partitions

    Purpose of sample: create a partition function and partition scheme on an existing database Server svr = new Server (instance); if (svr.Databases.Contains( "smotestdb" )) // change the name if needed { svr.Databases[ "smotestdb" ].Drop(); } Database db = new Database (svr, "smotestdb" ); db...
  • Blog Post: SMO Sample: Transfer

    Purpose of sample: Transfer a database; all objects and data Server tgt = new Server ( "." ); // Setup source connection (in this sample source is .\inst1 and target is '.' (the default instance) Server svr = new Server ( @".\inst1" ); Database db = svr.Databases[ "testdb" ]; // Setup transfer...
  • Blog Post: SMO Sample: Table column default constraint

    Purpose of sample: show how a column constraint can be created. Table tbl = new Table (db, "MyTestTable" ); Column c1 = new Column (tbl, "c1" , DataType .DateTime); c1.AddDefaultConstraint( /*name optional*/ ); c1.DefaultConstraint.Text = "getdate()" ; tbl.Columns.Add(c1); tbl.Create(); Disclaimer...
  • Blog Post: Upcoming at TechED: Web Based SQL Server Management Tool (Shared Source!)

    Visual Studio .NET 2003 shipped a web based sample application for management of SQL Server , based on ASP.NET and SQL-DMO. We're currently working on an updated version of that tool. This is a quick list of the things that we change: Revamped UI Improved navigation Improved architecture...
  • Blog Post: SQL Server: Table Partitioning in SQL Server 2005

    Table and Index partitioning is one if the new SQL Server 2005 features that willl improve life for the DBA and application developer quite a bit. It allows Indexes and Tables to be partitioned across multiple file groups. Partitioned tables and indexes, are fully manageable with SMO. Here is a quick...
  • Blog Post: Scripting in Microsoft SQL Server 2005 Web Cast Resources

    This article contains extra information with regard to the web cast "Scripting in Microsoft SQL Server 2005 " that was held on 6/22/2005 9:30-11:00 PST. Q&A Log Question: Is sql server management studio part of standard edition ? Answer: Yes. Every edition except for Express Question: Is...
  • Blog Post: Scripting in Microsoft SQL Server 2005 -- Web Cast has finished

    I just finished the Scripting in Microsoft SQL Server 2005 webcast. Thanks all for being online (and also thank you MVP's for answering questions!) I was a little nervous doing this (it's a big deck with lots of demos) but I think it went quite OK. Let me know if you have any requests/comments...
  • Blog Post: DMO FAQ

    Q: Is SQL-DMO still supported with SQL Server 2005? A: Yes, SQL-DMO will be fully supported (albeit officially deprecated), however it will not be able to make use of any new SQL Server 2005 features. SQL-DMO will be available through a special 'backward compatibility redist' (filename = SQLServer2005_BC...
  • Blog Post: SQL Server: Capture Object changes with SMO Capture Mode

    In a previous article I have showed how a SMO object can be serialized into a Transact-SQL script, which allows you to recreate the object. What if you want to have the script that is emitted when you changed one or more properties of an object? In that case Capture Mode comes in handy. This switches...
  • Blog Post: SQL Server: SMO Scripting Basics

    Let's first clarify what I mean by "scripting". It often happens during talks or when I explain SMO fundamentals that eyes gloss over, shortly after which the "what * do you mean by scripting" question pops up (replace the * with your favorite combination of adjective and noun to indicate bewilderment...
  • Blog Post: SMO FAQ

    Q: With which SQL Server versions is SMO compatible? A: SQL Server 2000, and SQL Server 2005. Q: Is there going to be a redist for SMO? A: Yes, is a combined redist that contains, SMO, RMO, AMO. NMO, DTS Runtime. This is downloadable from the web: http://www.microsoft.com/downloads/details.aspx?FamilyId...
  • Blog Post: Index for SQL Server related articles

    I'm starting to post articles around SMO and other topics, like WMI, SQLCMD, and other areas. This index will be helpful to get quick access to these posts. Hope you like the posts. If you do (or don't), please let me know! SMO and DMO Tuning your SMO Application Part 1 Tuning your SMO Application...
Page 1 of 2 (30 items) 12