After the column has been added to the table, modify any views you want to display for the newly created column. Typically, you would add the new column to custom views that you have created.

Note   The views provided with MDT do not require modifications, because all these views already return all columns. If you have not created custom views, you can skip this step.

Modify the dependent views in the MDT DB using:

·     SQL Server Management Studio. For more information on how to add a column using SQL Server Management Studio, see the section, “Working with Views (Visual Database Tools),” in SQL Server Books Online, included with SQL Server.

·     ALTER VIEW Transact-SQL statement. For more information on how to drop a view using the ALTER VIEW Transact-SQL statement, see the section, “ALTER View (Transact-SQL),” in SQL Server Books Online, included with SQL Server.

·     Other SQL Server management tools. For more information on how to perform this task using other SQL Server management tools, see the documentation for the corresponding tool.

To modify the dependent view, you need to know:

·     The columns that you will add to the view

·     The SQL SELECT statement used to create the view

For more information on determining what to use of each of the items in the previous list, see the section, ”Modifying Views,” in SQL Server Books Online, included with SQL Server.

Even if the views do not require modification, refresh all views that reference modified tables by running the sp_refreshview stored procedure. The sp_refreshview stored procedure is required to update views when the columns in dependent tables or views have changed. For more information about the sp_refreshview stored procedure, see the section, "sp_refreshview (Transact-SQL),” in SQL Server Books Online, included with SQL Server.

Example: How Woodgrove Bank Modified the Dependent Views

Woodgrove Bank does not need to modify any views, as the LocationSettings view already returns all columns from the Settings table. However, Woodgrove Bank ran the sp_refreshview stored procedure to refresh the ComputerSettings, LocationSettings, MakeModelSettings, or RoleSettings views, which reference the Settings table. This allows all the views to return the computer name of the antivirus server, if required.

Related Topics

Extending the MDT DB Schema