Posts

Showing posts from October, 2019

Managing database objects in SQL with SMO framework

SQL Server Management Objects (SMO) is a collection of objects that are designed for programming all aspects of managing Microsoft SQL Server. SQL Server Replication Management Objects (RMO) is a collection of objects that encapsulates SQL Server replication management. To get a good overview see the  SMO Programming Guide . There many operations which may be performed with SMO from obtaining information about SQL-Server objects to creating and modifying objects or perhaps backing up or restoring a database. The code sample below is used to transform single column PKs and FKs in composite ones.  The source code can be found on GitHub at: https://github.com/dradoaica/Managing.Database.Objects.In.SQL.With.SMO Enjoy (ง°ل͜°)ง