We have a database schema with a period in it's name. This is valid as per
http://msdn.microsoft.com/en-us/library/aa224033(SQL.80).aspx. When we create a maintenance plan to update statistics it will succeed if the object property is set to 'Tables and Views'.
If this is set to 'Table' it will fail.
Steps to Reproduce
- Create a new schema in a user database with a period in it's name, ie
CREATE SCHEMA [Windows.EventLog] AUTHORIZATION [dbo]
- Create a table with owner using schema created in #1, ie
CREATE TABLE [Windows.EventLog].[Computer](
[ComputerId] [smallint] IDENTITY(1,1) NOT NULL,
[ComputerName] [varchar](255) NOT NULL,
CONSTRAINT [PK_Computer] PRIMARY KEY CLUSTERED ([ComputerId] ASC)
) ON [PRIMARY]
- Create a new maintenance plan, drag 'Update Statistics Task' to designer surface, edit properites, choose the user database, View T-SQL and test execution: it will work
- Edit maintenance plan and modify 'Update Statistics Task', change Object to Table, change selection to all, execute task and it will fail. Also, if you now try to click 'View T-SQL' or change it back to 'Tables and Views', a error dialog with
title 'Microsoft.SqlServer.MaintenancePlanTasksUI' shows will message 'Object
View Complete Post