?
Solved

Error 4502: View or function XXX has more column names specified than columns defined

Posted on 2013-12-03
3
Medium Priority
?
2,240 Views
Last Modified: 2013-12-11
Due to an unfortunate incident, an SQL Update which was in progress got interrupted, and as a result, one of my views in my master database is a bit unhappy.  When I start my SQL Server up from the command line I get this error:

Error: 4502, Severity: 16, State: 1.
View or function 'sys.dm_os_sys_info' has more column names specified than columns defined.

I know there is a system stored procedure known as sp_refreshview, but when I run it like this:

EXECUTE sp_refreshview 'sys.dm_os_sys_info'

Open in new window


I get the error:

Msg 15165, Level 16, State 1, Procedure sp_refreshsqlmodule_internal, Line 55
Could not find object 'sys.dm_os_sys_info' or you do not have permission.

I am presently running my SQL Server using the T902 switch, so that the script "sqlagent100_msdb_upgrade.sql" does not run and prevent the database from coming online.  I need to fix the abovementioned error prior to re-running this script.

Can anybody suggest a fix that I can apply to overcome the error
0
Comment
Question by:LesterClayton
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Mohit Vijay
ID: 39692368
It seems that your table columns have been changed but you have not updated those in sys.dm_os_sys_info view

Error clearly says that whatever columns you have in this view, some of them are not available.
0
 
LVL 18

Accepted Solution

by:
LesterClayton earned 0 total points
ID: 39701821
Ended up removing the SQL Instance and reinstalling.
0
 
LVL 18

Author Closing Comment

by:LesterClayton
ID: 39710852
Reason: EE members were unable to assist me, apart from stating the obvious.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question