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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Object reference of the database to be removed

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-02-18 : 08:03:35
Cindy writes "Hi,
We, in our company are looking at removing a database from the server. I wanted to know if there is any easy to find out whether any objects of the database to be removed are referenced by any other databases on the server.

Thanks for all your help.

SQL: SQL Server 2000
OS: Win2k with the latest sp"

nr
SQLTeam MVY

12543 Posts

Posted - 2004-02-18 : 08:15:59
Script all the databases and do a search for the database name or look in syscomments of each database.

select object_name(id) from syscomments where text like '%mydb%'


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-02-18 : 09:19:22
A good discussion about that here:

http://weblogs.sqlteam.com/brettk/archive/2004/02/05/841.aspx

And I think Rob's was the most elegant



Brett

8-)
Go to Top of Page

SQLCode
Posting Yak Master

143 Posts

Posted - 2004-02-18 : 10:29:04
That helps.
Go to Top of Page
   

- Advertisement -