Why to Avoid Using the Current Database Name in Object Definitions in SQL Server

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.

Hello, my name is FINE

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

Read the full article here.

Previous Post
PASS Summit 2019 Call for Speakers is Open – How I Sketch Out My Submission Ideas
Next Post
Take the 2019 State of SQL Server Monitoring Survey: Here’s What’s in It For You

Related Posts

No results found

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Menu