To specify the extended attributes, objects in the SQLServer database are divided into three levels (0, 1, and 2 ). Level 0 is the highest level and is defined as an object included in the database scope. Objects of level 1 are included in the architecture scope or user scope, and objects of level 2 are included in level 1 objects. Can be defined for any level of objects in these levels
To specify the extended attributes, objects in the SQL Server database are divided into three levels (0, 1, and 2 ). Level 0 is the highest level and is defined as an object included in the database scope. Objects of level 1 are included in the architecture scope or user scope, and objects of level 2 are included in level 1 objects. Can be defined for any level of objects in these levels
To specify the extended attributes, objects in the SQL Server database are divided into three levels (0, 1, and 2 ). Level 0 is the highest level and is defined as an object included in the database scope. Objects of level 1 are included in the architecture scope or user scope, and objects of level 2 are included in level 1 objects. You can define extended attributes for any level of objects in these levels.
Objects that reference a certain level must be limited by the names of higher-level objects that own or contain them. For example, when you add an extended attribute to a table column (level 2), you must specify the table name (level 1) that contains the column and the schema (Level 0) that contains the table ).
For a complete list of objects and their valid levels 0, 1, and 2, see using extended attributes for database objects.
If all object types and names are empty, the attribute belongs to the current database.
Extended attributes are not allowed for system objects, objects outside the scope of the User-Defined database, or objects not listed as valid inputs in Arguments.
Architecture and users
In earlier versions of SQL Server, you have database objects such as tables, views, and triggers. Therefore, you can add extended attributes to one of these objects and specify the user name as level 0. However, in SQL Server 2005, database objects are included in the architecture. They are independent of users with architecture.
In SQL Server 2005, we recommend that you do not specify USER as level 0 when applying extended attributes to database objects, as this will cause name resolution to be ambiguous. For example, assume that user Mary has two architectures (Mary and MySchema) and both of them contain tables named MyTable. If Mary adds the extension attribute to the MyTable and specifies @ level0type = N 'USER' and @ level0name = Mary, it is not clear which table the extension attribute applies. To maintain backward compatibility, SQL Server applies the attribute to the table contained in the schema named Mary. For more information about users and architectures, see user architecture separation.