The query processor is unable to produce a plan because the index on table or view is disabled.

The query processor is unable to produce a plan because the index ‘PK__employee__65D7121708EA5793′ on table or

view ’employeedetails’ is disabled.

REPRO the error:

CREATE TABLE employeedetails
(empid INT
,empname VARCHAR(100) PRIMARY KEY
,deptid INT)

INSERT INTO employeedetails VALUES(101,’Emp1′,1)
INSERT INTO employeedetails VALUES(102,’Emp2′,1)
INSERT INTO employeedetails VALUES(103,’Emp3′,1)

ALTER INDEX PK__employee__65D7121708EA5793 ON DEVDB..employeedetails
DISABLE

The following query will throw the error.
SELECT * FROM employeedetails

The database engine is not able to produce query plan for this request and so the request is aborted. To avoid this

error the clustered index of this table should be enabled. If the clustered index is not needed then this must be

dropped. Disabling the clustered index causes the error when you want to browse the table.

Regards,
Online MSSQL Classes @ http://tuitionaffordable.webstarts.com

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s