September 11, 2007 at 10:34 pm
the report from SQL Server Upgrade Advisor running against a user database,
when to fix: Before
Description: Object reference not set to an instance of an object. VIEWCHECKOPT.
However I checked. this object does not exist in this database.
Did anyone experience this problem? I have searched microsoft website and internet, couldn't find the answer.
Can someone help with this?
Thanks,
Sherry
September 13, 2007 at 1:39 am
I believe that the Description "should" tell you that there is a reference to the non-existant VIEWCHECKOPT object somewhere in the database, probably in a stored procedure.
It would have been easier if UI would tell you where it found the reference.
Andy
September 13, 2007 at 4:26 am
I haven't seen this issue, however I've seen issues where theobject was renamed and the name does not match the object definition. This could be why you can't find the object. Here's a script to identify object swhere the object name and object definition do not match. Run from the database in question:
SELECT TABLE_NAME AS 'OBJ',LEFT(VIEW_DEFINITION,255) AS 'DEF'
FROM INFORMATION_SCHEMA.VIEWS
WHERE VIEW_DEFINITION NOT LIKE '%' + TABLE_NAME + '%'
UNION
SELECT ROUTINE_NAME, LEFT(ROUTINE_DEFINITION,255)
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION NOT LIKE '%' + ROUTINE_NAME + '%'
September 13, 2007 at 4:44 am
If you are referring to a database object called VIEWCHECKOPT in a view, function, trigger, ... that does not exist anymore (you can have this easily), you can identify the object by
SELECT OBJECT_NAME(id) FROM syscomments WHERE text LIKE '%VIEWCHECKOPT%'
Does the above give you any results?
Regards,
Andras
September 13, 2007 at 5:28 pm
Andras,
results:
"(0 row(s) affected)"
Sherry
September 13, 2007 at 5:32 pm
Andy,
All I got in "description" from UA is "Object reference not set to an instance of an object" as I posted before.
Sherry
September 13, 2007 at 6:29 pm
Hi cmille 19,
excellent! there is a view which name does not match that in the definition. I will check with our sys admin who has been working on it.
Thanks a lot,
Sherry
September 13, 2007 at 6:48 pm
Hi all,
after renaming the view back to match that in the definition, I ran UA again, this warning message disappeared.
Thanks for your help!
Sherry
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply