Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keep old (ex-employee) user login

Status
Not open for further replies.

despierto

Programmer
Jun 25, 2004
39
0
0
US
Can anyone think of any reason (besides oversight) why a company might keep logins for former employees on a database?

I'm wondering if, say JimJones is the owner of sp_Acme, and you remove JimJones, what happens to sp_Acme?

Any other scenarios, generally vague is fine, that you can think of would be appreciated... Also, any comments of "Never keep old users, you ____!" would be appreciated to...
 
You can't delete a user from the database if the user still owns obects. You will need to change the owner to another user before you can delete the old user.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I use this little procedure to display all objects the user owns....

CREATE PROCEDURE dbo.usp_FindObjectsOwned @Username varchar(15) AS

BEGIN

select u.Name as 'User',
o.Name as 'Object'
from sysobjects o
JOIN sysusers u ON u.uid = o.uid
where u.Name = @Username

END


example: exec dbo.usp_FindObjectsOwned 'the user name'


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top