Opinions expressed on this site are solely those of Kendra Little of Catalyze SQL, LLC. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.
on March 18, 2019
I’ve recently published an article, “Why You Shouldn’t Hardcode the Current Database Name in Your Views, Functions, and Stored Procedures,” over on Simple Talk.
In the article, I discuss:
- Why referencing the current database name creates a dependency
- What ‘deferred name resolution’ is, and why the dependency may be more noticeable in views and some functions (rather than stored procedures)
- Which activities are most likely to break if you place dependencies on the current database name