Simple Backup/Restore Utility With SQL-DMO Using VB.NET - Understanding SQL-DMO Objects
(Page 2 of 5 )
If we carefully look at that object tree, the SQLServer object forms the trunk of the SQL-DMO object tree. Every branch or sub-branch can be considered a SQL-DMO object that has a relation to the MS-SQL server component in some way. Even though there exist several branches from that object, there are mainly three in-depth objects coming out as branches (highlighted in different colors). They are
- Database
- JobServer
- Replication
Let us take a look at the most commonly used SQL-DMO objects.
SQLServer object contains the objects and collections that implement SQL Server administrative tasks for SQL-DMO. The object allows SQL-DMO applications to connect to an instance of SQL Server by name, establishing the context for administrative tasks. Without this object, generally we cannot connect to an SQL Server instance at all.
Database object is a major component of the SQL-DMO object tree. This object contains collections that define the tables, stored procedures, data types, and users of a database. Methods of this object allow you to perform essential database maintenance functions, such as creating a new SQL Server database, backing up a database, and so on.
Replication object represents the entire replication system for an instance of SQL Server, and is the root of all replication objects. It can perform all types of replications defined in SQL Server.
JobServer object exposes attributes associated with SQL Server Agent. SQL Server Agent is responsible for executing scheduled jobs and notifying operators of SQL Server error conditions or other SQL Server execution or job states.
Backup object defines a backup operation related to a SQL Server database or log. With this object we can back up a SQL Server database or database transaction log.
Restore object defines a restore operation related to a SQL Server database or log. With this object we can restore an entire or partial SQL Server database or database transaction log from an existing backup.
Table object exposes the attributes of a single SQL Server table. With this object we can create a SQL Server table, change an existing SQL Server table by adding or dropping columns, export data from, or import data to, an existing SQL Server table, generate a Transact-SQL script to recreate an existing SQL Server table, remove a table from a SQL Server database, and so on.
Column object represents the properties of a single column in a SQL Server table. With this object, we can define the columns for a new SQL Server table, define a new column for an existing SQL Server table, drop an existing column from a SQL Server table, list the references of a SQL Server column, and so forth.
There exist several collections to get the existing objects from a SQL Server instance through SQL-DMO. I suggest you refer to SQL Server books online for further information on other SQL-DMO objects. The next page introduces you to SQL-DMO programming.
Next: Programming SQL-DMO using .NET >>
More Visual Basic.NET Articles
More By Jagadish Chaterjee
|
| · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | | |
|