Solved

object 'LC_tbl', database 'LC', owner 'dbo'

Posted on 2009-05-04
7
356 Views
Last Modified: 2012-05-06
Expert,

we created object LC_tbl table in DB LC by dbo owner and used user is 'domain\aa' with System admin permission created this object. I changed domain\aa system admin permission to read-only, it caused the object select table LC_tbl failed, can I change this object to sa role? b/c  domain\aa is windows login, everyone knows pwd and userid. I want to be security, so what level user login I should change to for this LC_tbl object.  
0
Comment
Question by:yrcdba7
  • 4
  • 3
7 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 500 total points
ID: 24296869
use this


EXEC sp_changeobjectowner 'LC_tbl', 'sa'
0
 

Author Comment

by:yrcdba7
ID: 24298216
expert,

how to check each objects with which onwer? we have hundreds objects create by user domain\aa, we are going to take this user away but we don't know which objects created by this users. can you tell the command?
thanks,
0
 

Author Comment

by:yrcdba7
ID: 24299124

expert,

I tried to change objects owner name to dbo, it gave me error like:

Cannot change owner of object 'LC_tbl" or one of its child objects because the new owner 'dbo' already has an object with the same name.

I look at the table owner is dbo.  but when I change domain\aa system admin
permission, why this object can not do select.

can you help?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:yrcdba7
ID: 24299148

expert,
when I tried to run this:
EXEC sp_changeobjectowner 'LC_tbl', 'sa'


Server: Msg 15410, Level 11, State 1, Procedure sp_changeobjectowner, Line 55
User or role 'sa' does not exist in this database.

so what onwer I change to this tbl can do select? I can I see why domain\aa permission (system admin) changed, the object LC_tbl can not select?
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24301384
well, I can guess that either SA user doesn't exist or don't have permission to the database you are using. first of all find out what principal and its member available in your database, you can find it the way from my small article at:

http://www.sqlhub.com/2009/05/find-database-principal-and-its-member.html

As soon as you done with finding what user you have, you can use any of the user from that list, if SA is not there, you can't use it there.

0
 

Author Comment

by:yrcdba7
ID: 24315291

Expert,

I looked at your link, it looks like you used SQL 2k5, our DB still use sql 2k. do you have SQL 2k one?
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24315713
well in that case you can login to your enterprise manager, right click on the user and check its permission, I don't have SQL2K otherwise, I would have given you proper steps.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

707 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

11 Experts available now in Live!

Get 1:1 Help Now