Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2009-05-04
7
Medium Priority
?
379 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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
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.

609 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