Ms sql ошибка 208

Permalink

Cannot retrieve contributors at this time

title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords

MSSQLSERVER_208

The specified object cannot be found, giving rise to an invalid object name message. See an explanation of the error and possible resolutions.

MashaMSFT

mathoma

04/04/2017

sql

supportability

reference

208 (Database Engine error)

MSSQLSERVER_208

[!INCLUDE SQL Server]

Details

Attribute Value
Product Name SQL Server
Event ID 208
Event Source MSSQLSERVER
Component SQLEngine
Symbolic Name SQ_BADOBJECT
Message Text Invalid object name ‘%.*ls’.

Explanation

The specified object cannot be found.

Possible Causes

This error can be caused by one of the following problems:

  • The object is not specified correctly.

  • The object does not exist in the current database or in the specified database.

  • The object exists, but could not be exposed to the user. For example, the user might not have permissions on the object or the object is created within an EXECUTE statement but accessed outside the scope of the EXECUTE statement.

User Action

Verify the following information and correct the statement as appropriate.

  • The object name is spelled correctly.

  • The current database context is correct. If a database name for the object is not specified, the object must exist in the current database. For more information about setting the database context, see USE (Transact-SQL).

  • The object exists in the system tables. To verify whether a table or other schema-scoped object exists, query the sys.objects catalog view. If the object is not in the system tables, the object has been deleted, or the user does not have permissions to view the object metadata. For more information about permissions to view object metadata, see Metadata Visibility Configuration.

  • The object is contained in the default schema of the user. If it is not, the object must be specified using the two-part format schema_name.object_name. Note that scalar-valued functions must always be invoked by using at least a two-part name.

  • The case sensitivity of the database collation.

    When a database uses a case-sensitive collation, the object name must match the case of the object in the database. For example, when an object is specified as MyTable in a database with a case sensitive collation, queries that refer to the object as mytable or Mytable will cause error 208 to return because the object names do not match.

    You can verify the database collation by running the following statement.

    SELECT collation_name FROM sys.databases WHERE name = 'database_name';  
    

    The abbreviation CS in the collation name indicates the collation is case sensitive. For example, Latin1_General_CS_AS is a case sensitive, accent sensitive collation. CI indicates a case insensitive collation.

  • The user has permission to access the object. To verify the permissions the user has on the object, use the Has_Perms_By_Name system function.

See Also

USE (Transact-SQL)
Metadata Visibility Configuration
HAS_PERMS_BY_NAME (Transact-SQL)

This is the error message returned:

Msg 208, Level 16, State 1, Line 1
Invalid object name ‘ENG_PREP’.

It happens after I try the following query:

insert into ENG_PREP VALUES('572012-01-1,572012-01-2,572012-01-3,572013-01-1,572013-01-2',
'',
'500',
'',
'A320 P.001-A',
'Removal of the LH Wing Safety Rope',
'',
'',
'',
'0',
'',
'AF',
'12-00-00-081-001',
'',
'',
'',
'',
'',
'',
'' )

In this article we explain about ERROR 208, why it occurs and how to deal with it.

We often come across situations which seem to be very complicated and challenging but are actually very easy to get out of; provided we think logically. One such situation a lot of SQL Server DBA’s come across is the SSMS error 208, i.e. the ‘Invalid Object Name’ error. This is a very commonly occurring error which ends up confusing a lot of DBAs. So today, we will not only provide you with a solution to this problem, but also suggest you ways to avoid it from occurring in future.Dealing With Database Context Error 208 In SQL Server

What is Error 208 in SSMS

Error 208 In SSMSA lot of us or those DBAs who are not very experienced with using SQL Server, usually opt for exploring the software with the help of SQL Server Management Studio (SSMS). And while you are at it, you might click at a given object to know more about it, and suddenly come across a pop up stating ERROR 208! This is a point where a lot of you might get stuck. But after reading this article we hope things would get better as you would get a greater understanding of the subject.

What is most perplexing about this error to majority of DBAs is the fact that the object is visible to them in SSMS Object Explorer window but when they attempt to select it using T- SQL, they witness the error. This is the point where a lot of DBAs switch to extreme and desperate measures like restarting SSMS multiple times to furiously refreshing queries, restarting databases, etc. But to their sorrow, none of this will provide them with the solution they are looking for.

These practices fail to work because none of these is addressing the root cause of the error which is nothing but simple mismatch in database context.

How to Solve Error 208 in SSMS

Now that you know what is causing the error, finding the solution should not take long. The most common reason for this context mismatching error to occur is the fact that the default database context has been set to master. Well in 99 out of 100 cases, this ends up being the cause. And if this really is what is causing the error to appear in your system, then a very basic thing for you to do is changing the context of the database. And while you are at it, change it in a way that the context becomes similar to the current database object that is in use.

Once you perform this step, you will be glad to see that the error will appear no longer, and all other functions will also happen smoothly. This is one of those errors that almost every single DBA would have experienced, but few would actually know a way out of this situation without considering a repair sql action. This article would hopefully be of help to all of them. Apart from the solution given above, there is one more option that DBAs can try out; this involves prefixing multipart database name to the database that is in use. Or you might also want to change the database that opens by default once you login SSMS.

Author Introduction:

Victor Simon is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupted mdb and sql recovery software products. For more information visit https://www.datanumen.com/

When trying to change the user account to link with the NewMary login:

EXEC sp_change_users_login 'Update_One', 'Mary', 'NewMary'
go

I get the error 208:

Msg 208, Level 16, State 1, Procedure ChangeLogging_LogDDLCommands, Line 147
Invalid object name ‘Utils.dbo.ChangeLogging_DDLCommands’.

I don’t find any relevant information on ChangeLogging_DDLCommands, and I’m lost at how I do have to proceed from there.

RRS feed

  • Remove From My Forums
  • Question

  • Hi all,

    I had created the distribution database in SQL server 2012 successfully. 

    I want to configure the publication and distribution on the same instance.

    i tried creating the publication , right click on publication—> next—>  Invalid object name ‘IHpublications’.  Could not use view or function ‘dbo.syspublications’ because of binding errors (Microsoft SQL Server, Error: 208)

    Kindly hep on this.?

All replies

  • Hi all,

    I had created the distribution database in SQL server 2012 successfully. 

    I want to configure the publication and distribution on the same instance.

    i tried creating the publication , right click on publication—> next—>  Invalid object name ‘IHpublications’.  Could not use view or function ‘dbo.syspublications’ because of binding errors (Microsoft SQL Server, Error: 208)

    Kindly help on this.

    • Edited by

      Friday, December 27, 2013 3:27 PM

    • Merged by
      Sofiya Li
      Monday, December 30, 2013 7:33 AM
      the same question

  • Hi all

    any help on this??

  • If «IHpublication» is view then check underlying tables/views/functions is not renamed or dropped.

    check with running sp_depends ‘IHpublication’ that all related obejects there.

  • Hi MSSQLLOVER,

    You post the same question two times. Please avoid this practice on Forum, I 
    have merged the related thread  into this thread.

    According  to your description, we need to verify if your database was previously used in other replication, or
     you upgraded this database from the lower version of SQL Server , I recommend you use sp_removedbreplication before starting the publication. Or you can recreate new database in SQL Server 2012 and reconfigure replication via the New Publication
    Wizard and check if it can run well.  

    Regards,
    Sofiya Li


    Sofiya Li
    TechNet Community Support

  • Have you tried what I suggested. Error 208 cause only when there is bad dependency i.e. dependent objects missing/deleted.

    Run the command sp_depends ‘IHpublication’  and find the missing , and recreate them.

     

  • Hi  pradeep,

    find the below error after executing sp_depends ‘IHpublication’ 

    Msg 15009, Level 16, State 1, Procedure sp_depends, Line 25
    The object ‘IHpublication’ does not exist in database ‘distribution’ or is invalid for this operation.

    i had tried using sp_removedbreplication but still same error while configuring publisher.

      Invalid object name ‘IHpublications’.  Could not use view or function ‘dbo.syspublications’
    because of binding errors (Microsoft SQL Server, Error: 208)

    kindly let ume how to proceed from here.

  • Hi cotter,

    yes. i can see the table dbo.IHpublications under distribution database.

  • Did you mean that you received the error after clicking «Next» which shows in the pic? Until now, the commands to create publication did start yet. There may be some problem with SSMS, try another one. Alternatively, use codes to create subscription.


    彼节者有间,而刀刃者无厚;以无厚入有间,恢恢乎其于游刃必有余地矣!

  • Mr4038 ошибка мерседес актрос
  • Mr white has the fish three times a week исправить ошибки
  • Mr slim mitsubishi electric коды ошибок
  • Mr je 70a ошибки
  • Mr 9963 ошибка мерседес atego