Solved

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

Posted on 2013-12-03
3
1,659 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 17

Accepted Solution

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

Author Closing Comment

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

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now