September 28, 2012 at 4:38 am
Hi All
So Here is some code that was happily running until today:
SELECT 1
FROM EWH_Staging.dbo.STAGE_REMP_VCC_Distinct vcc
It has now failed with
Invalid object name 'EWH_Staging.dbo.STAGE_REMP_VCC_Distinct'.
First thing I think is EWH_Staging has been dropped. No EWH_Staging ever existed on the local server
There is an EWH_Staging database on a remote server so I thought "There must have been a synonym that existed but now doesnt?"
There are no server aliases either?
Looking at DDL cahnges for the last week in a ssms report there were no aliases dropped in the last week. My question is DOES SQL SERVER CACHE synonym definitions?
Maybe it was dropped over a week ago but the definition remained in the cache and then it was flushed and then it broke?
Ive run out of ideas and this is going to bug me going into the weekend
September 28, 2012 at 5:57 am
wedgemail (9/28/2012)
First thing I think is EWH_Staging has been dropped. No EWH_Staging ever existed on the local server
Check whether table/view called STAGE_REMP_VCC_Distinct exists in the database EWH_Staging.
September 28, 2012 at 6:10 am
It does but its on a remote server not local?
September 28, 2012 at 6:16 am
wedgemail (9/28/2012)
It does but its on a remote server not local?
in that case, being on a remote server, you need a linked server so you can get to it.
and the command would change to
SELECT 1
FROM MyLiunkedServer.EWH_Staging.dbo.STAGE_REMP_VCC_Distinct vcc
Lowell
September 28, 2012 at 6:17 am
If it is on remote server, I guess query should be as follows:
SELECT 1
FROM RemoteServerName.EWH_Staging.dbo.STAGE_REMP_VCC_Distinct vcc
September 28, 2012 at 7:42 am
I dont think Im being clear
I know how to get it to run(add a linked server) but my question is how can
this code run successfully:
SELECT 1
FROM EWH_Staging.dbo.STAGE_REMP_VCC_Distinct vcc
It should have failed but it didnt until today
I know it hasnt changed either?
Is it a plan cache thing?
September 28, 2012 at 9:08 am
wedgemail (9/28/2012)
I dont think Im being clearI know how to get it to run(add a linked server) but my question is how can
this code run successfully:
SELECT 1
FROM EWH_Staging.dbo.STAGE_REMP_VCC_Distinct vcc
It should have failed but it didnt until today
I know it hasnt changed either?
Is it a plan cache thing?
if it ran yesterday on the exact same machine, but not today, something changed;
it might be the user you are running the query doesn't have a matching user in the EWH_Staging database(was it restored?)
it might be the database or table was dropped or renamed.
can you check the basics first...
when you said it exists on a remote machine, that made us think you are ont eh wrong machine, or missing a linked server.
Lowell
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply