Questions tagged [invalid-object-name]
26 questions
6
votes
3 answers
Invalid object name Error when querying SQL Server Database from R using ODBC
I have setup a connection in R:
conn <- dbConnect(odbc::odbc(),
Driver = "SQL Server",
Server = "...",
Database = "AdventureWorks2012")
The default ODBC driver is AdventureWorks2012. I can see the…

Sasha Babaei
- 455
- 3
- 8
4
votes
1 answer
Invalid object name 'CHANGETABLE'
I just enabled change tracking by turning on ALLOW_SNAPSHOT_ISOLATION, executing this query to turn on change tracking for the database
ALTER DATABASE [DatabaseName]
SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 2 DAYS,AUTO_CLEANUP = ON)
and by…

Cambesa
- 456
- 1
- 4
- 15
2
votes
2 answers
"Invalid object name" after restoring SQL Server 2008 database
I'm switching my web host and backed up my database. Due to some restriction with my new host I could not restore the .bak file and had to send to them so they would restore it. Once they had restored it, I ran my application I get…

Kimpo
- 5,835
- 4
- 26
- 30
2
votes
1 answer
Invalid Object Name for Table which is successfully updated in the same Stored Procedure
We are seeing 'interesting behavior with our SQL Sever Database. We have a merge statement which selects a table X. In the match clauses there is a subselect to table X. When we execute the stored procedure from the SQL Server Tools it works fine.…

Jens Schauder
- 77,657
- 34
- 181
- 348
2
votes
6 answers
SQL query in a query
[Corporate confidential information or graphics removed]
I have this sort of structure in my database. I need to build a list of employees' names followed by names of their departments and offices. By now I've come to this query:
ALTER PROCEDURE…
user2182397
1
vote
0 answers
Query or log all query with invalid object name error
I have got an old and big database with a lot of extra stored procedures. I've executed a query to find unused queries.
SELECT
O.name,
PS.last_execution_time
FROM
sys.dm_exec_procedure_stats PS
INNER JOIN sys.objects O
ON O.[object_id] =…

Amirhossein Yari
- 2,054
- 3
- 26
- 38
1
vote
1 answer
The "Invalid object name ..." error appears in one server but no in the other one
I have a wired situation. The code below works perfectly well on one server, but not in the other one. Databases compatibility level is the same on both of the servers. I use sql server 2016.
;USE MyDB;
GO
--exec…

Data Engineer
- 795
- 16
- 41
1
vote
1 answer
Created Object in Python Shell, not recognized when queried
Currently creating a Django site for some work I'm doing. Here are the relevant code blocks:
portal/device_categories/models.py
from django.db import models
# Create your models here.
class Type(models.Model):
device_category =…

nuckingfut5
- 35
- 5
1
vote
1 answer
Invalid object name 'TableName' exception appears randomly
I have a windows service application that imports a CSV file. During the import process, the application runs a series of queries to the database. During stress testing, we tried importing a CSV with 40k records. That means at least 40k queries to…

darwin25
- 11
- 4
1
vote
1 answer
Visual C# SQL Server Northwind Database Error: Invalid Object Name 'dbo.Products'
My issue is that I keep getting an error on console that says
Invalid Object Name 'dbo.Products'
I am using Visual C# 2008 Express Edition and SQL Server 2008 Express.
I have had some issue with preparing/installing the Northwind sample database,…

Andrew Ricci
- 475
- 5
- 21
1
vote
1 answer
How to identify & remove Invalid Objects in SQL Server database?
I have to work on a database in which there are many stored-procedures & views that are referencing non-existing tables & columns. How can I get the list of invalid objects (Tables, Columns) so I can fix it accordingly?

Yaqub Ahmad
- 27,569
- 23
- 102
- 149
0
votes
0 answers
TypeError: Invalid object type at position 0
TypeError: Invalid object type at position 0
revenues=pd.DataFrame({"year": years, "money": moneys})
revenues["year"] = pd.to_numeric(revenues["year"])
revenues["money"] = revenues["money"].apply(corrector_money)
revenues["money"] =…

Ryan99
- 1
0
votes
0 answers
Why Is This Column Name Invalid?
The code below results in the error (On Line 25):
Invalid column name: FileDate.
IF OBJECT_ID(N'TempDB.dbo.#CriminalCases') IS NOT NULL DROP TABLE #CriminalCases
SELECT cc.CourtCaseID, cc.CaseDisplayNumber, cc.FileDate
into #CriminalCases
FROM…
0
votes
0 answers
Would anyone know why I am getting invalid object name for CTE_ApplicationStatus?
1 DECLARE @Totalapp int,
2 @10days int;
3 SELECT @Totalapp = Count(0) from dbo.company;
4 WITH
5 CTE_ApplicationStatus AS (
6 SELECT
7 ROW_NUMBER() OVER (PARTITION BY a.Id ORDER BY a.Id, asl.DateCreated…

Jay
- 1
0
votes
1 answer
EF core Invalid object name after table rename in App Service stg env
I'm running my app locally, in dev env and also in prd env without a problem, but in stg env I get this "Invalid object name 'bls.TaskFeedReactions" exception..
I renamed the table from "TaskFeedReactions" to "FeedReactions", the migrations dropped…

MarchalPT
- 1,268
- 9
- 28