Geeks With Blogs

News

View Anthony Trudeau's profile on LinkedIn

Add to Technorati Favorites


Anthony Trudeau

I found another oddity that seems to be undocumented today.  This one in SQL Server 2005.  Apparently, you cannot start objects (at least stored procedures) with the word "Log".

I have a table called ShipNoticeLog and a stored procedure called LogShipNotice.  The table is the noun and the stored procedure is the action -- this is how I prefer to do the naming.  My code quickly failed with the message, "Invalid object name 'LogShipNotice'..."  I ended up solving my issue by renaming the stored procedure as AddShipNoticeLogEntry.  A little more verbose, but it'll suffice.

By the way, I classify this as a bug not because there's anything wrong with the restriction, but the fact that it isn't documented or at the least clearly documented.

Posted on Wednesday, September 24, 2008 2:21 PM SQL Server , bugs | Back to top


Comments on this post: Cannot start with 'Log'

# re: Cannot start with 'Log'
Requesting Gravatar...
Hi Anthony,

Interesting post. But which version of SQL Server are you testing this with?

I am using SQL Server 2008 and I dont have problems with starting object names with "Log".

Thanks, Frank
Left by Frank Wang on Sep 24, 2008 2:47 PM

# re: Cannot start with 'Log'
Requesting Gravatar...
This is in SQL Server 2005.
Left by Anthony Trudeau on Sep 24, 2008 4:01 PM

Your comment:
 (will show your gravatar)


Copyright © Anthony Trudeau | Powered by: GeeksWithBlogs.net