Solved

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

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

726 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