August 23, 2005 at 11:45 pm
Hi everybody,
this is a follow up to my earlier post about changing the default schema for the user. My next question is: assuming that my application creates it's own database on the server for it's data is it ok to store that data in the 'dbo' schema of that database? Some folks that I know raised a concern that this is a bad practice and that 'dbo' schema is reserved for system tables and DBA activity. I understand that concern for 'master' DB, but is it also true for any other DB that my app creates? If so, could you clarify what exact issues can this cause?
My problem is that I need to find a common DB schema to store my tables for different users that use Windows authentication to connect to SQL2000. The user that connects first will create all the tables, but there is no way to know the login name of that user in advance. Since I'm using SQL2000, the schema in which the object is created is the user name and therefore there is no way to know which schema the objects are created in. I'm planning to use 'dbo' as a known schema that always exists and create my objects using "dbo" prefix to know where they are stored. Are there any other solutions for this?
Thanks in advance,
Vladimir.
August 24, 2005 at 12:05 am
Vladimir, the 'folks that you know' are dead wrong. In general, the correct advice is to always create objects in the dbo schema. See Andy Warren's article Worst Practices - Objects Not Owned by DBO regarding this for more info. You could also take a look at my own Worst Practice - Not Qualifying Objects With The Owner for a related discussion.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply