Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 642
  • Last Modified:

SQL: ExtendedProperties::

Hello Team,

Is there an easy way to programmatically (using TSQL) update/add/delete extended property attributes and values on objects in SQL server?


Thx

JohnE
0
John Esraelo
Asked:
John Esraelo
  • 3
  • 2
2 Solutions
 
Anthony PerkinsCommented:
You may want to look at the sys.sp_addextendedproperty,  sp_updateextendedproperty and  sp_dropextendedproperty system Stored Procedures.
0
 
Rich WeisslerProfessional Troublemaker^h^h^h^h^hshooterCommented:
0
 
John EsraeloDatabase / SQL DeveloperAuthor Commented:
These are good guys.  I will have to write scripts around these 3 SPs.  For instance, I will have to check for an attribute's existence first prior to UPDATE.. thing like that..
but this should work..
Meanwhile, if you guys have snippets of some associated scripts then please share ;)
thx
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 
Anthony PerkinsCommented:
In order to check for existence consider using either
sys.fn_listextendedproperty
http://msdn.microsoft.com/en-us/library/ms179853(v=sql.105).aspx

Or:
sys.extended_properties
http://msdn.microsoft.com/en-us/library/ms177541(v=sql.105).aspx
0
 
John EsraeloDatabase / SQL DeveloperAuthor Commented:
awesome!  Thank you
0
 
John EsraeloDatabase / SQL DeveloperAuthor Commented:
I have started to build my automated routines to update my USP and UDF EP attributes.
thx
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now