Solved

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

Posted on 2013-12-03
3
1,924 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

695 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