tailieunhanh - Microsoft SQL Server 2005 Developer’s Guide- P47

Microsoft SQL Server 2005 Developer’s Guide- P47:SQL Server 2005 is a feature-rich release that provides a host of new tools and technologies for the database developer. This book is written to help database developers and DBAs become productive immediately with the new features and capabilities found in SQL Server 2005. | Developing with SMO IN THIS CHAPTER Using SMO SMO Hierarchy Building the SMO Sample Application Copyright 2006 by The McGraw-Hill Companies. Click here for terms of use. 439 440 Microsoft SQL Server 2005 Developer s Guide In this chapter you learn how you can manage SQL Server programmatically from by taking advantage of SQL Management Objects SMO . Like its predecessor Distributed Management Objects SQL-DMO SMO enables you to develop custom SQL Server management applications that you can tailor to your environment. Using SMO with or any other .Net language you can create custom SQL Server management interfaces that let you perform all the functions SQL Server s Management Studio provides. In fact SMO is the foundation for SQL Server s Management Studio. Using SMO you can list databases and tables add logins control replication import and export data and perform backups restores and many other administrative tasks. SMO opens up SQL Server to a number of custom programs that can both display and manipulate SQL Server and all of its databases and objects. In this chapter you get an overview of SMO as well as a look at its underlying architecture. Then you see how to use SMO from . In this section you see how to add the SMO object library to the Visual Basic Integrated Development Environment IDE . You also see how to perform some common tasks with SMO. Finally this chapter finishes by presenting a sample SQL Server management utility that s built using and SMO. Using SMO To get programmatic access to management functions of other database platforms you might need to master low-level networking and system interfaces if it s available at all. However SMO provides a .NET framework solution that makes SQL Server s database management functions easy to access. The hierarchy for the SMO objects used in the .NET framework is discussed in the next section of this chapter. SQL Server s SMO functions can be used by a programming language that is .

TỪ KHÓA LIÊN QUAN