in

SQL Server Community Blogs

Voices of the SQL Server Community
All Tags » SMO (RSS)

Browse by Tags

  • Programmatically Listing SQL Servers

    Using the .NET Framework there are a variety of ways you can search for available SQL Servers, but no single technique does the whole job. The best approach is to use a combination of methods to ensure you get the most complete list possible. Most methods rely on a UDP broadcast to locate servers - this...
    Posted to Jon Sayce (Weblog) by jonsayce on 02-10-2008
  • Extending SMO Classes with Extension Methods and IEnumerable(T)

    One of the simplest ways to audit changes to a table is to have a trigger that stores a copy of any row that's inserted/updated/deleted, together with some meta data such as who made the change and when they made it. There are limitations (such as several types which can't be used in the inserted and...
    Posted to Jon Sayce (Weblog) by jonsayce on 02-09-2008
  • How to fix slow SMO performance

    By default, when SMO queries the database for the properties of an object, it only loads the basic properties. This reduces the number of tables it needs to join in the query, so dramatically improves performance, as long as you don't need the other properties. As an example, lets look at building a...
    Posted to Jon Sayce (Weblog) by jonsayce on 02-09-2008
  • Data Scripter Add-in for Management Studio

    I do a lot of development work and I'm always generating Insert statements for test and development use. I also find I have a recurring need to move data from one database to another and I always seem to be firing up a database synch tool. I use a variety of diff and snych tools (Apex SQL and RedGate...
    Posted to seanprice (Weblog) by seanprice on 08-28-2007
  • Killing ProcessIDs using SMO

    "Exclusive Access could not be obtained because the database is in use" The above line should look familiar to anyone who has done a Database Restore and is easily solved if you are using Management Studio or Query Analyzer. My personal favorite is to just kick the DB into single user mode, which drops...
    Posted to seanprice (Weblog) by seanprice on 07-12-2007
  • SMO - Using SQL authentication

    I recently had a question about trying to get Mark's scripts ( http://blogs.msdn.com/mattm/ ) to work when the servers are only configured for SQL authentication. The user had changed the settings in the transfer section of the code and it still failed. The key is the server object. When you create it...
  • Using SMO from TSQL

    If you are desperate to get your hands on the code I used in the SMO in TSQL demo I did at the usergroup meeting you can download it now from codeplex. http://www.codeplex.com/SMOinTSQL There are 2 projects in there one an SSMS project and one a C# project. Both can be opened using the TFS in codeplex...
Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems