July 9, 2014 at 9:20 am
I'm trying to change references to a fully qualified object to a semi qualified in a stored procedure. I execute the alter procedure statement, it runs fine. When I open the source code for the stored procedure, the fully qualified object reference is still there.
SELECT columns
FROM [DB1].[dbo].[table1] t1
JOIN [DB1].[dbo].[table2] t2
ON t1.id = t2.id
to
SELECT columns
FROM [dbo].[table1] t1
JOIN [dbo].[table2] t2
ON t1.id = t2.id
July 9, 2014 at 9:31 am
Only reason I can think of for this would be you're either pointing at the wrong db or the wrong schema. I've never seen an alter successfully run but not update the proc.
July 9, 2014 at 9:55 am
Totally agree. I'm right-clicking 'Modify' - > making changes in query window -> execute -> Modify again to verify. This is strange.
July 9, 2014 at 9:58 am
I just tried it in a different database and it worked fine...
July 9, 2014 at 11:37 am
It's unlikely to be the reason in this case, but a server-level DDL trigger could probably make this happen.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 9, 2014 at 11:57 am
Maybe caching at the client, try a refresh... grasping at straws here. I've only ever seen it work.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 9, 2014 at 12:03 pm
Just for fun, you could also try DROP/CREATE.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 9, 2014 at 12:12 pm
I tried drop/create for laughs, still the same. I have a few databases on a local instance that I use for dev purposes, different branches if you will and have been keeping them in sync using openDBDiff. I wonder if applying changes via this software had anything to do with it. I'm looking through their open issues now.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply