.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Getting started with SQL Server Management Objects (SMO)

Posted By: Samrat Mohanta     Posted Date: December 13, 2010    Points: 2   Category :.NET Framework
Getting started with SQL Server Management Objects (SMO)

View Complete Post

More Related Resource Links

Data Points: SQL Server Management Objects


SQL Server Management Objects offer developers a robust toolset for backing up and restoring databases, and issuing DDL commands, as John Papa explains.

John Papa

MSDN Magazine June 2007

SQL Server and DMO: Distributed Management Objects Enable Easy Task Automation


SQL Server can be administered programmatically using system stored procedures, but Distributed Management Objects (DMO) offer a more modern, object-oriented alternative. This article introduces SQL-DMO in SQL Server 7.0 and SQL Server 2000 and describes the SQL-DMO object model, then focuses primarily on the Databases tree and the JobServer tree of the object model. The sample code and the article show how to use various objects such as the Registry object, the Configuration object, and the Database object to automate common administration tasks such as programmatically retrieving configuration settings, creating new databases, applying T-SQL scripts, and creating and scheduling backups.

Francesco Balena

MSDN Magazine May 2001

Error 2908 while installing sql server 2005 management objects collection on Win 7

I have SQL Server native client 2005 installed on Win 7 64-bit machine. While installing SQL Server XMO 2005 it gives error 2908 and aborts installation. Any suggestion on the error?

PS2007/MSSQL2008: Cannot install Microsoft SQL Server 2005 Management Objects Collection (sqlserver2

Hi folks, about 1,5 months ago I have set up a - 1 server - development environment for PS2007. I had installed all components on one Windows 2008 box. Everything worked fine, now I receive an error. •MOSS 2007 •SQL 2008 SP1 •MOPS 2007 SP2 I have done the additional installation for the cube building part according to this page http://technet.microsoft.com/en-us/library/dd285466(office.12).aspx Microsoft SQL Server Native Client (sqlncli.msi) Microsoft SQL Server 2005 Management Objects Collection (sqlserver2005_xmo.msi) Microsoft SQL Server 2005 Backwards Compatibility Components (SQLServer2005_BC.msi) Everything worked fine. Cubes were able to be built.. everything was good. In order to have Reports built I added SSRS 2008 Reporting Services Addin for MOSS (rsSharePoint_x64) Business Intelligence Development Studio (=Visual Studio for MSSQL) No CUs have been added to this box. NOW, Cube creation fails with the error: ULS LOG: [CBS] ProjectServerOlapCubeGenerator status: Analysis Services session failed with the following error: Failed to connect to the Analysis Services server <IPADDRESS>. Error: ActiveX component can't create object 08efbc13-299a-4abe-9021-c46887ca6915 Eventlog says: SSP Name: SharedServices1 PSError: CBSASConnectionFailure (17003) Cube build failed to connect to the Analysis Services server. Verify the data source connection i

Install failed for SQL Server Management Objects


I am trying to install SQL Server Management Objects on a server which has MSXML6.0 and ReportingServices Add-in for Sharepoint, but the installation is failing saying higher version is already exists on the machine.

But when I could not find the SMO assemblies (Microsoft.SqlServer.Smo.dll) on the  server.

What could be the problem? Is SMO collection installed by another component other than SQL Server? Where can i find the SMO assemblies on my server.

Sujanakar Reddy

SQL Server 2008 R2 Management Objects (SMO) standalone installer

Is there a standalone installer for SQL Server 2008 R2 Management Objects (SMO)? I have been unable to find a download location for a R2 package. It was installed on my machines as part of the Express edition, but I need a standalone installer for individual client deployment. Any help would be appreciated. Cheers, Travis

To connect to this server you must use SQL Server Management Studio or SQL Server Management Objects


What could be wrong?

I get this error when a stored procedure is executing sp_OAMethod from SQL Server 2000 SP4.

EXEC @rc = master..sp_OAMethod @Obj, 'Execute'

The linked server is SQL Server 2005 x64.  Already installed is SQLServer2005_BC_x64.msi version April 15, 2006.  Local server is SQL Server 2000 SP4. 

I can execute the sproc successfully in Query Analyzer from my local dev box which has both 2000 and 2005 installed.  Profiler in 2005 indicates success for the whole sproc. 

It fails when I execute in Query Analyzer while connected on SQL 2000 SP4.  Tried this with 3 different machines SQL Server 2000 SP4.  The server do not have any 2005 component installed.

According to Profiler in 2005, the last event that happen is

SQL: BatchCompleted

if (object_id('master.dbo.sp_MSSQLDMO80_version') is not null) exec master.dbo.sp_MSSQLDMO80_version else if
(object_id('master.dbo.sp_MSSQLDMO70_version') is not null) exec master.dbo.sp_MSSQLDMO70_version else select 0

Below is the trapped Query Analyzer message.

Error Source: Microsoft Data Transformation Services (DTS) Package 
Error Description:Package failed because Step 'dts_name_removed' failed. 
Error code: 80040428 \
Error Help File:sqldts80.hlp 
Error Help Context ID:700 

Step Error Source: Microsoft SQL-DMO (O

Basic Instincts: Objects and Values, Part 2: Memory Management


In the June 2002 installment of Basic Instincts I began a discus-sion of objects and values. This month I'll build on that column, so I will assume you've read the June installment and that you know the fundamental differences between value types and reference types.

Ted Pattison

MSDN Magazine October 2002

Getting Started with SQL Server Compact 4.0 and ASP.NET 4

The article Getting Started with SQL Server Compact 4.0 and ASP.NET 4 was added by tmorton on Monday, August 09, 2010.

While professional developers are waiting for the Visual Studio Tools and Designers for SQL Server Compact 4.0, I will show how impatient developers can include SQL Server Compact with ASP.NET applications, and use it from ASP.NET pages. Previously, you

A Brief Introduction to Enterprise Metadata Management for SharePoint Server 2010 Developers

Learn about some basic developer tasks that you can use as basic building blocks for more powerful and complex metadata solutions.

Building Records Management Solutions with SharePoint Server 2007

Learn records management features and concepts, such as Records Center configuration, and records series planning and routing, and explore the Official File Web service and a sample client application to create and deploy a custom router with a routing type.

SQL Server Management Studio


Hi folks


Am sorry if this mght be abit silly question am a Novice Developer.

If am using Visual Studio 2008 Pro, Do I need SQL Server Management Studio? or is it included in the VS 2008 Pro Suite? Am learning C# and SQL Server.



Need help with setting up SQL Server 2008 for role/user management


I've posted my problem in a few other categories.  Sorry for that.  I didn't see the security category until now.

I'm trying to use ASP.NET's built-in role/user management for a couple ASP.NET MVC 2 sites.  I'm using the MVCMusicStore as my guide.  I click on the Configuration Tool as the tutorial suggests, which launches the site administration page.  Unfortunately when I click on the security tab, I get an error that it cannot connect to the data store.  Attempting to test the AspNetSqlProvider gives me a similar error.

I've run the aspnet_regsql program as the error message suggested, and I have a role/user management database ready to go on the server.  The proper tables are constructed, and all that.  The configuration tool still doesn't see the data store.

As a test, I ran the MVCMusicStore demo in the debugger.  Its role/user management functionality worked.  I was able to add myself as a customer, and add/remove items from my cart with no errors or exceptions.  However, when I attempted to access its security tab in the configuration tool, I received the same error as I get for my own project.  How is it possible that role/user management works, but the configuration tool cannot change its settings?

Any suggestions on how I can get the configuration t

How to connect to local instance of SQL Server 2008 Management Studio Express ?


I just installed SQL Server 2008 Management studio Express on my Vista machine.

i tried connecting to local machine using :

.\sqlexpress, (local)\sqlexpress, or .\SQLExpress, MyPCNAME\SQLExpress

nothing is working, getting this error:

Cannot connect to PC-NAME\SQLEXPRESS. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Educational question: How server objects are accessed from multiple client threads?

I will appreciate it if someone can help me to undestand how the following scenario works:   There is remoting server that is registered as WellKnownObjectMode.Singleton. Server implementation: It instantiates a class TestServer that implements interface IFoo interface IFoo { IHelper GetHelper() }   interface IHelper { void StoreString(); }   Implementation of TestServer: internal sealed class TestServer: System.MarshalByRefObject, IFoo { private IHelper> helper = new Helper(); public IHelper GetHelper(string helper){return helper;} }   Implementation of Helper: internal sealed class Helper : System.MarshalByRefObject, IHelper { public void StoreString (string val) {}; }   Implementation of a client (simplified; shown to illustrate the question only): static class Program { public static IFoo TestService; public static IHelper Helper; public TestThreads testmultiplecalls; [STAThread] static void Main() { TestService = (IFoo)Activator.GetObject(typeof(IFoo),"ipc://Channel"); Helper = TestService.GetHelper(); testmultiplecalls.Start(); } }   internal class TestThreads { public Start() { for (int i = 0; i < 20; i++) ThreadPool.QueueUserWorkItem((new TestCall(i.ToString())).DoWork); } }     internal class TestCall { private string m_str; public TestCall (string str) {m_str = str;} public void DoWork() { Program.Helper.StoreString(m_str); } }     Que

SQL Server Management Studio Slow Grid Draw and Refresh

I've istalled SQL2005/SSMS on my development machine and connecting to a local SQL Server 2005. Executing queries is fast but the results grid populating is slow and so is the refresh of the same data. This is not a slow query, its the gridview draw/redraw. I've other PC's with slower processors and less ram with the same software run circles around the SMSS Performance on this Laptop   I've read posts about nvidia graphics drivers and mouse drivers causing issues similar to this. I do have an nvidia quadro x1600M (this is a laptop Compaq 8710w) and switching off the accelerator using Displays/Advanced/Troubleshooting by moving the slider to the middle/center position causes the gird refresh to dramatically increase. It's funny how turning oof the accelerator increases performance.   I have the latest HP nvidia drivers and SSMS is useable without hardware acceleration  but I also develop software that uses directx and its getting really troublesome to work this way.   I am running:   Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_qfe.070227-2300)Language: English (Regional Setting: English)System Manufacturer: Hewlett-PackardSystem Model: HP Compaq 8710wBIOS: EPP runtime BIOS - Version 1.1 Processor: Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz (2 CPUs)Memory: 3072MB RAMPage File: 515MB used, 4439MB availableWindows Dir: C:\WIN

SQL Server Logs too big under Management

Hi, The sqlserver logs ("Current - date","Archive-date"...) is too big to open easily (esp at the time of crisis). Any idea how can I restrict the size of these logs to manageable size so that they can be read immediately? Is there any way to Archive daily logs separately? Thanks Chander
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend