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,927 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

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