Why does Umbraco include the name of the web application pool in table names?
Hello,
I've just created a new umbraco web application that uses a SQL database and when I checked the name of the created table, I noticed that the format of these name is:
[AppPoolIdentityName].[TableName]
Is it intended? If so, i'm curious... Why does the name of the app pool identity is included in the table name?
When an application, or an individual user, creates a table (or any database object) in SQL Server, it is prefixed with the 'owner' of that object, back in the day you might have had hundreds of users all using the same SQL database for their data storage needs, therefore identifying the owner of the object by the name was/is super useful.
Usually you'll see dbo.tablename and this means the table was created by a user who is in the SQL Server database owners role, otherwise you'll see the name of the user.
There is a good introduction to Object owners / Schemas in SQL here:
What I'm guessing here is that when you installed Umbraco, and supplied the connection string to your SQL database, that you were using windows authentication, and so therefore the account Umbraco was running under (App Pool account) was used to authenticate to SQL, and this account isn't identified in SQL Server as being a 'database owner', consequently when Umbraco created the database tables it needs to operate, these were all give the object owner prefix of the app pool account.
So not an 'Umbraco thing' more of a SQL server account authentication thing.
Why does Umbraco include the name of the web application pool in table names?
Hello,
I've just created a new umbraco web application that uses a SQL database and when I checked the name of the created table, I noticed that the format of these name is:
Is it intended? If so, i'm curious... Why does the name of the app pool identity is included in the table name?
Hi ssougnez
When an application, or an individual user, creates a table (or any database object) in SQL Server, it is prefixed with the 'owner' of that object, back in the day you might have had hundreds of users all using the same SQL database for their data storage needs, therefore identifying the owner of the object by the name was/is super useful.
Usually you'll see dbo.tablename and this means the table was created by a user who is in the SQL Server database owners role, otherwise you'll see the name of the user.
There is a good introduction to Object owners / Schemas in SQL here:
https://www.sqlteam.com/articles/understanding-the-difference-between-owners-and-schemas-in-sql-server
What I'm guessing here is that when you installed Umbraco, and supplied the connection string to your SQL database, that you were using windows authentication, and so therefore the account Umbraco was running under (App Pool account) was used to authenticate to SQL, and this account isn't identified in SQL Server as being a 'database owner', consequently when Umbraco created the database tables it needs to operate, these were all give the object owner prefix of the app pool account.
So not an 'Umbraco thing' more of a SQL server account authentication thing.
I think
regards
Marc
This actually makes sense. Thanks for the clarity ;-)
is working on a reply...