Getting Started in SMO

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics

This page provides links to topics designed to help you get started using SQL Server Management Objects (SMO). The topics listed cover the SMO object hierarchy, writing programs in SMO, SMO and different programming languages, and specific programming tasks.

Installing SMO

Installing SMO gives instructions for installing and referencing the SMO assemblies.

Object Model

Object Model describes the SMO object hierarchy and how the objects relate to one another.

Programming Languages

Programming Languages describes the programming environment and includes detailed procedures to start writing an SMO program in C#.

General Programming in SMO

General Programming in SMO is an introduction to programming with SMO. This topic describes how to connect to an instance of SQL Server, and how to use properties, methods, and collections. More advanced topics describe data types, transactions, setting the capture mode, and event and exception handling.

Programming Specific Tasks

Programming Specific Tasks includes concepts and procedures about how to program specific tasks using SMO. The topic also describes complete programmatic management of SQL Server.