Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Database name including a period (.) acceptable?

Author  Topic 

patshaw
Posting Yak Master

177 Posts

Posted - 2012-02-29 : 07:03:54
Is including a period in the name of a database acceptable practise or can it lead to issues?

ie. [My.Database]

Obviously you can wrap it in [] as above but I am wondering whether other functions such as system procedures may struggle with this.

Thanks.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2012-02-29 : 07:07:43
You can, but shouldn't. After 20 years in the trade I can tell you writing brackets is boring.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-02-29 : 07:33:42
Heck, if you really want to confuse people (possibly yourself too) just name the database with a single period.
Go to Top of Page

patshaw
Posting Yak Master

177 Posts

Posted - 2012-02-29 : 11:29:55
So I suppose the old "Just because you can doesn't mean you should" rule comes into force......Thanks.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-29 : 12:36:27
I can't find it now, but Rob posted a pretty amusing entry on invisible databases.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2012-02-29 : 13:21:26
bcp most likely would throw up



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2012-02-29 : 13:40:51
quote:
Originally posted by SwePeso

You can, but shouldn't. After 20 years in the trade I can tell you writing brackets is boring.



N 56°04'39.26"
E 12°55'05.63"



hmnph. brackets appeal to my compulsive personality. they are 'neat'

but still -- don't name things for keywords or with restricted characters -- it'll come back to bite you in the ass at some point.

Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2012-02-29 : 14:00:34
quote:
Originally posted by russell

I can't find it now, but Rob posted a pretty amusing entry on invisible databases.
I've since enhanced that presentation, you can download the slides and scripts here:

http://www.sqlsaturday.com/viewsession.aspx?sat=103&sessionid=7057
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2012-02-29 : 15:30:23
There it is! Thanks Rob. Gives me a huge smile everytime.
Go to Top of Page
   

- Advertisement -