Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
fredong
Yak Posting Veteran
80 Posts |
Posted - 2005-09-27 : 17:24:19
|
| our developer left the company and he has created numerous of objects such as the store procedures views, and triggers using his name as a dbo owner. I have found out the the objects that he owned but I need to know how to find out some objects that is using his db owner name in the script or objects. Is there a way to do it? Thanks.k |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2005-09-27 : 17:44:09
|
| His user id is stored in the sysusers table. You can find all the objects he owns by looking at the user id in the sysobjects table. That will also allow you to tell what types of objects he owns. Make sure he is removed from all AD groups also.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
fredong
Yak Posting Veteran
80 Posts |
Posted - 2005-09-27 : 18:29:24
|
| how about the objects that has dependency on his objects? How can I find it out or script it out?k |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-28 : 00:24:33
|
| you need to query each of those objects against your object list--------------------keeping it simple... |
 |
|
|
TimS
Posting Yak Master
198 Posts |
Posted - 2005-09-28 : 10:55:22
|
| You might try thisSELECT DISTINCT OBJECT_NAME(id) FROM syscomments where text like '%username.%'andSELECT DISTINCT OBJECT_NAME(id) FROM syscomments where text like '%[username].%'Tim S |
 |
|
|
|
|
|