?
Solved

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

Posted on 2009-05-04
7
Medium Priority
?
373 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
[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
  • 4
  • 3
7 Comments
 
LVL 31

Accepted Solution

by:
RiteshShah earned 2000 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

771 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