Where are extended properties stored in SQL Server?
Are they stored in the database containing the object it was added to, or are they stored separately and bound to the local machine somehow.
For example, if I add populate the "Description" field (MS_Description extended property) in SSMS to document a table's column, and I then shut down the database engine and copy the MDF/LOG files out to attach it to a different machine, will the extended properties go with the copied file, or will they get left behind in the master database (or something like that) on the local machine?
They are stored in the database. You can get them by querying the view sys.extended_properties
and they are stored in System Base Table sys.sysxprops.
From MSDN:
"[…E]xtended properties are stored in the database[.]"
So yes, when you create a backup and/or move the database, the extended properties go with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With