Cursor reads, but does not operate
I am having a lot of problems with what seems like it would be an awefully useful bit of SQL from Chapter 13. Actually, the problem seems to extend throughout the AdventureWorks2008 database. I am not able to REBUILD the indexes in this database. I even went as far as to drop and create a new version of one of them, which is the very first one that stops the process to see if the cursor would be able to run the REBUILD to the next index, but it wouldn't. Then, I went into the indexes individually and attempted a rebuild in the MSSMS. When doing it by hand in MSSMS it appears to be working, but the percent fragmented remains the same.
I would like to know why this is occurring. Like it says in the book "Keeping your indexes defragmented is, however, a core part of administering your system." Could this be because of all the constraints on the table. I understand that clustered indexes have the actual column data on the leaf. Is the leaf constraint the problem.
I'm going to try this on some of my own data to see if I can get it to run without getting the error that I get when working on the AdventureWorks2008 database which is as follows:
Reindexing Production.ProductListPriceHistory.PK_ProductListP riceHistory_ProductID_StartDate
Msg 1088, Level 16, State 9, Line 1
Cannot find the object "Production.ProductListPriceHistory" because it does not exist or you do not have permissions.
Thank you,
Donny Buckman
|