Solved

Use of sp_addextendedproperty to add descriptions on Tables & columns when Owner NOT dbo but PSEUDEOuser USER

Posted on 2004-08-23
3
1,920 Views
Last Modified: 2012-05-05
How can I add descriptions to EITHER a table OR a column when the table owner is NOT dbo but DOES have db_owner role?

all of the examples given:

exec sp_addextendedproperty N'MS_Description', N'This is a description', N'user', N'dbo', N'table', N'table_name'

I want to assume that I do NOT know the username so it's not just N'other user' (in the 3rd to the end parmameter)
I really want to use the USER pseudo column and assume the one adding the description is the OWNER (this is a safe assumption to make)

Thanks!
0
Comment
Question by:strongs120
3 Comments
 
LVL 34

Accepted Solution

by:
arbert earned 500 total points
ID: 11877039
I've never found it possible to do this (it's a little bit disappointing that descriptors aren't easier to work with in SQL).  Just a suggestion, since you have to call a proc to do it anyway, setup your "Meta Data" table and insert all your extended properties into this user create table--you have more options and more flexibility in the future using your own.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now