简体   繁体   中英

Remove all 'hidden' references to a table in SQL Server

I'm working on SQL Server version 2019, and I'm a dev with decent SQL knowledge. Hope this explanation is sufficient to get some help.

So another dev mistakenly ran a vendor script on database A instead of database B. Part of what that script did was to create a table, I'll call it table ABC.

Problem is that the script failed when it ran on A, so ABC was not created on A. At least we all thought that was the case because expanding the Tables folder in SSMS showed no table ABC.

However the vendor app is no longer working when pointing to A. It says it can't find that table ABC!

Looks like the vendor app queries someplace else to get a list of tables in the database. I think it could be querying sys.objects or INFORMATION_SCHEMA.TABLES because that table is listed there.

So my question is, how can I remove all of those references for ABC, wherever they may be located? Thanks much for any advice!

Ok so the table did exist. When the dev ran that script the table was not created as dbo.tablename, but as userid.tablename. So in SSMS, that table appeared last - after the 200+ plus dbo tables. Sorry for this post.

Thanks to all who responded so quickly though, I love stackoverflow for that reason.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM