Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ssougnez 93 posts 319 karma points c-trib
    Oct 22, 2018 @ 13:54
    ssougnez
    0

    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?

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Oct 25, 2018 @ 22:41
    Marc Goodson
    100

    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

  • ssougnez 93 posts 319 karma points c-trib
    Oct 26, 2018 @ 00:50
    ssougnez
    0

    This actually makes sense. Thanks for the clarity ;-)

Please Sign in or register to post replies

Write your reply to:

Draft