C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » Databases »

How to change the owner of the Objects(table,view etc) in a SQL Server Database?


Posted Date: 08 Jun 2004    Resource Type: Articles    Category: Databases
Author: PuneetMember Level: Silver    
Rating: 1 out of 5Points: 5



Introduction

sp_changeobjectowner
Changes the owner of an object in the current database.

SYNTAX


sp_changeobjectowner [ @objname = ] 'object' , [
@newowner = ] 'owner'

Where 'object' would be replaced by the table, view etc of which u need to change the owner and 'owner' would be replaced by the userid of the new owner of the database object.

Summary

You may try it in SQL Query Analyser to change the object owner for SQL Server DB objects. Enjoy and happy coding



Responses

Author: Gangadhar Kotu    17 Jul 2004Member Level: Silver   Points : 0
Your solution is very good and helped me. I'll help to my friends what ever the subject I had now.

Thanks Puneet

Gangadhar
Wipro Infotech.
Bangalore




Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to read data from a different Server in SQL Server?
Previous Resource: Modifying the Column Information using T_SQL Commands
Return to Discussion Resource Index
Post New Resource
Category: Databases


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use