473,401 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Bug in Enterprise Manager?

Hi all, met with something very scary and want to confirm if anyone
else have met this possible bug with EM?

Got a production DB, say DB_A with quite a few users in it. this day,
when I look into the EM-->management-->Current Activity-->Locks/Object,
I saw a lot of locking on some objects belonging to a user, say User_A
but the problem is, this User_A doesn't own a thing in DB_A!! And even
if I drop this user from DB_A, the EM GUI still showing there are quite
a locks on objects owned by User_A.

And if use Query Analyzer to direct query on system tables, all are
fine, that is those locks are actually on another User_B, which is
fine.

So I've checked that the problem seems to lie in that User_B has a uid
8 in DB_A whereas User_A has the same uid (8) in master db. Once I
remove User_A from master db, then the EM GUI shows no locking at all
(though in system tables, there are still lockings in User_B's object).

So I guess it's a bug in EM but has anyone met with this kind of case
before?

Jul 23 '05 #1
5 1436
Hi

Not a bug in EM, you have a real security problem.

You user ID's do not match across all your databases. Must have been that a
DB was restored from another server.

You are going to have to remove all the users from the non-system DB's and
then grant them access and permissions again. The only thing you can trust
is syslogins and sysusers in master, model, msdb and tempdb. The rest are
not reliable..

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mi**@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"New MSSQL DBA" <bo*******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi all, met with something very scary and want to confirm if anyone
else have met this possible bug with EM?

Got a production DB, say DB_A with quite a few users in it. this day,
when I look into the EM-->management-->Current Activity-->Locks/Object,
I saw a lot of locking on some objects belonging to a user, say User_A
but the problem is, this User_A doesn't own a thing in DB_A!! And even
if I drop this user from DB_A, the EM GUI still showing there are quite
a locks on objects owned by User_A.

And if use Query Analyzer to direct query on system tables, all are
fine, that is those locks are actually on another User_B, which is
fine.

So I've checked that the problem seems to lie in that User_B has a uid
8 in DB_A whereas User_A has the same uid (8) in master db. Once I
remove User_A from master db, then the EM GUI shows no locking at all
(though in system tables, there are still lockings in User_B's object).

So I guess it's a bug in EM but has anyone met with this kind of case
before?

Jul 23 '05 #2
New MSSQL DBA (bo*******@gmail.com) writes:
Hi all, met with something very scary and want to confirm if anyone
else have met this possible bug with EM?

Got a production DB, say DB_A with quite a few users in it. this day,
when I look into the EM-->management-->Current Activity-->Locks/Object,
I saw a lot of locking on some objects belonging to a user, say User_A
but the problem is, this User_A doesn't own a thing in DB_A!! And even
if I drop this user from DB_A, the EM GUI still showing there are quite
a locks on objects owned by User_A.


Mike is plain wrong when he say there this not a bug in Enterprise Manager.
There is a bug, and I have known about for a long time. In difference to
you, I didn't run into it this way - I found it by looking at the code.

Here is the relevant part from sp_MSset_current_activity (a procedure
that exists only for Enterprise Manager):

select @stmt ='update ' + @locktab + ' set [Table] = name,
[ObjOwner] = user_name(uid) from ' + quotename(@lckdb, '[') +
'.[dbo].[sysobjects] where id = ' +
convert(nvarchar(10), @lckobjid) + ' and [Database] = ''' + @lckdb
+ ''' and [ObjID] = ' + convert(nvarchar(10), @lckobjid)
exec (@stmt)

The context is that the procedure have first found all processes and locks
and saves these in a temp table. Then it iterates over all locked objects
to translate the names in a look. The bug is the part

user_name(uid)

user_name() works in the current database, but here we examine some
other database. the programmer should have joined with
@lckdb + '.dbo.sysusers' instead.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #3
How can uid of users in all the databases be the same??

Say I've got 5 logins, all of them have access to system database and
only 1 of them has access to DB_A and another 1 has access to DB_B,
then how is it possible that the users for these logins in different
database be of the same uid?

Jul 23 '05 #4
Thanks a lot, that's exactly my guess but I couldn't confirm it before.

Wow, I'd say that's a really junior mistake and as I've searched
Microsoft KB, it hasn't been documented as a bug or whatsoever and they
haven't fix it for such a long time.

Jul 23 '05 #5
New MSSQL DBA (bo*******@gmail.com) writes:
How can uid of users in all the databases be the same??

Say I've got 5 logins, all of them have access to system database and
only 1 of them has access to DB_A and another 1 has access to DB_B,
then how is it possible that the users for these logins in different
database be of the same uid?


Not really sure what you mean, but uid is a database-specific id, so id
17 in db_A can be user Ture and in db_B it's user Ingvar. Which may or
may not map to the same login.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PF | last post by:
On one of our machines, all of the SQL Server 2000 components except for the main Server component (SQL Server core) itself were installed (Management tools, etc) a while ago and everything was...
4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
1
by: mikew | last post by:
I am working at a company that has been using MS SQL Server, and we are going to be switching over to postgresql next week. (Getting off of Windows will be a relief!) I am very familiar with SQL...
0
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
2
by: AH | last post by:
Dear all, I am facing this 'bug' that really drive me nut. I created a trigger for Update script and tested in Enterprise manager to ensure it function correctly. However, when I used both VB or...
0
by: mirzausce | last post by:
Accuired eServer i5 570 - Enterprise Edition; questions.. -------------------------------------------------------------------------------- My company just purchased this unit from a company...
1
by: Alex | last post by:
Hi Everyone, Most of our MS SQL Servers are still running on SQL 2000, but being I will soon be upgrading my workstation to Vista Business I'd like to install MS SQL 2005 Enterprise Manager to...
1
by: chudson007 | last post by:
Hi All, What are the pros and cons between using Enterprise Manager or Query Analyzer for my queries. Currently I use Enterprise Manager because I prefer the interface and only use Query...
2
by: grant | last post by:
Man do I struggle with Enterprise Manager as a graphical tool for building views etc. Its flaky and hangs frequenlty so i have to kill it with the task manager and re open it. You cant debug...
2
by: Robert | last post by:
I'm a newbie trying to find the SQL Server Enterprise Manager so I can create a database. I have installed SQL Server 2005 Express and SQL Server Management Studio Express. On the SQL Server menu...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.