SMO
The following table lists the SQL Server Management Objects (SMO) programming samples.
Samples are provided for educational purposes only. They are not intended to be used in a production environment and have not been tested in a production environment. Microsoft does not provide technical support for these samples. Sample applications and assemblies should not be connected to or used with your production SQL Server database or your report server without the permission of the system administrator.
Name | Description |
---|---|
Demonstrates how to back up and restore a database. |
|
Performs identity checks on each table in the selected database. |
|
Demonstrates how to create a SELECT stored procedure for each table in the selected database. |
|
Demonstrates techniques for implementing database defragmentation capabilities in database applications. |
|
Demonstrates techniques for implementing database space monitoring applications. |
|
Implements dependency tree and property display window. |
|
Demonstrates techniques for implementing database index space monitoring applications. |
|
Demonstrates how to load and register a Microsoft .NET Assembly into Microsoft SQL Server. Uses the UtilityConversion assembly. |
|
Demonstrates how to create, alter, and drop a database. Includes adding a new file group and log file. |
|
Demonstrates how to add, modify, and remove users. |
|
Demonstrates how to create, alter, and drop tables. |
|
Rebuilds all the indexes in the selected database. |
|
Demonstrates how to script the dropping or creating of a table. |
|
Demonstrates how to create Service Broker objects by using SMO. |
|
Demonstrates how to connect to the SQL Server system. |
|
Displays a list of server and connection properties for the selected instance of SQL Server. |
|
Browses the hierarchy of SMO objects using .NET reflection. |
|
Demonstrates techniques for implementing a comparison of two database objects. |
|
Demonstrates techniques for displaying SQL Server events in a console database application. |
|
A console application that connects to the selected instance of SQL Server and dumps selected properties. Can be used to verify the SQL Server connection. |
|
Demonstrates scripting and retrieving database object dependencies. |
|
Enumerates a list of available instances of SQL Server. |
|
Displays the SQL Server services that are available to start, stop, pause, and resume. |
|
Reads and displays trace information from an instance of SQL Server. |
|
Used with LoadRegAssembly. Contains demonstration common language runtime functions for use with SQL Server. |
|
Verifies a backup on a backup device to ensure the data can be used to restore the database. |
See Also
Other Resources
Preparing to Use SMO
Creating SMO Programs