System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'INFORMATION_SCHEMA.Columns

  • Hi,

    Below is the Exception:

    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'INFORMATION_SCHEMA.Columns'.

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

    at System.Data.SqlClient.SqlDataReader.get_MetaData()

    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

    at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

    at System.Data.Common.DbCommand.ExecuteReader()

    at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)

    at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)

    at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)

    at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)

    at System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[] parameters)

    at M.DataContextWrapper`1.ExecuteQuery[TResult](String query, Object[] parameters)

    at M.Models.PackageWriterModel.GetColumnNames(String table)

    at M.PackageWriter.CreatePackageFile[T](String tableName, String[] fileMeta)

    at M.PackageWriter.CreatePackageFiles()

    at M.PackageWriter.CreatePackage()

    at M.Program.CreateOutputPackage()

    at M.Program.Run(String[] args)

    Help Me,

    Thanks

  • What is the query that you used, and in which environment?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • suresh0534 (8/4/2014)


    Hi,

    Below is the Exception:

    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'INFORMATION_SCHEMA.Columns'.

    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()

    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

    at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()

    at System.Data.SqlClient.SqlDataReader.get_MetaData()

    at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

    at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

    at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

    at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

    at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)

    at System.Data.Common.DbCommand.ExecuteReader()

    at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)

    at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)

    at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)

    at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)

    at System.Data.Linq.DataContext.ExecuteQuery[TResult](String query, Object[] parameters)

    at M.DataContextWrapper`1.ExecuteQuery[TResult](String query, Object[] parameters)

    at M.Models.PackageWriterModel.GetColumnNames(String table)

    at M.PackageWriter.CreatePackageFile[T](String tableName, String[] fileMeta)

    at M.PackageWriter.CreatePackageFiles()

    at M.PackageWriter.CreatePackage()

    at M.Program.CreateOutputPackage()

    at M.Program.Run(String[] args)

    Help Me,

    Thanks

    Quick though, could this be a failed login? Please double check the credentials used.

    😎

  • Is there even a question here? This just looks like a stack trace from .net.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • I don't see a question, but it is definitely a stack trace from .NET. Looks to me like a login doesn't have permission to do something against INFORMATION_SCHEMA.Columns. I would start by looking at M.Models.PackageWriterModel.GetColumnNames. I presume you have more familiarity with it than I do.

  • My problem is solved.

    I changed the Collation of Database.

    It's working Perfectly.

    Thanks

  • suresh0534 (8/4/2014)


    My problem is solved.

    I changed the Collation of Database.

    It's working Perfectly.

    Thanks

    From what to what?

  • suresh0534 (8/4/2014)


    My problem is solved.

    I changed the Collation of Database.

    It's working Perfectly.

    Thanks

    Ah yes, it's INFORMATION_SCHEMA.COLUMNS.

    Case-sensitive databases, can't live with them, sure can live without them 🙂

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply