Need basic explanation of database schemas and sde

1213
2
06-25-2011 06:43 PM
NeoGeo
by
Occasional Contributor III
Everything was pretty simple in SQL Server 2000/SDE but then 2005 brought in schemas.  Other than that a schema means a form of ownership, can someone give me a basic explanation of schemas?

Formerly, I had one user account (sql authenticated so it would not be tied to a particular user that could leave and have his account deleted) that could create datasets.  This worked because we were supposed to be using a standardized dataset framework so all the layers were created with their standardized attributes beforehand.  I had two roles - viewers and editors.  All the GIS techs were added to the editors role and the non-GIS users were added to the viewers role.  That meant all the data was owned by one user and all the GIS people could edit it.  Fast forward now to SQL 2005/2008 and SDE 9.3.1/10 where we now have schemas.  I did not see anything in the ArcSDE docs covering this but I could have missed it.  If I set up the database using the dbo schema, do I want all of the windows authenticated users to have their own schema?  Do I want them all to use the dbo schema?  Is there some discussion of this somewhere?

Thanks!!
0 Kudos
2 Replies
RussellBrennan
Esri Contributor
Hopefully this helps:

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?topicname=users_and_schemas_on_sql_server_2005

I think that the first sentence in the last paragraph:
"That means you must create a schema for each user who will own data, the schema must have the same name as the user, and that schema must be specified as the default schema for the corresponding user."

The 10 Help:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/A_quick_tour_of_adding_and_administeri...

"When you add users, you also assign them a default schema in the database. If the user is going to own data in the geodatabase, the default schema must have the same name as the user name. If it does not, the user cannot create datasets, copy datasets into the geodatabase, or use geoprocessing tools that result in new datasets."
0 Kudos
NeoGeo
by
Occasional Contributor III
Thanks for the link.  I would not have thought to look for something that is completely server related in the Desktop help and for whatever reason if I searched for schema, the search just failed like it was a reserved word or something.

I am still not clear on schemas though.  The help in the link seems to indicate that each user must have a schema with the exact same name as the user, but in practice this does not seem to be true.  In the 9.3.1 database, most of our data was created with a sql account mapped to the dbo schema.  In the AGS 10 sde geodatabase I was forced to use my windows account to create the geodatabase because for some reason the post install would not accept a sql account so it mapped my account to the dbo schema and won't let me change it.  Also, if you create a schema with the same name as each user, who should own that schema, that user or dbo?

Thanks again!
0 Kudos