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 2005 Forums
 SQL Server Administration (2005)
 Drop all/specific objects

Author  Topic 

learntsql

524 Posts

Posted - 2009-11-10 : 23:37:14
Hi..
How to drop All/Specified database objects from a specified database.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-10 : 23:38:20
What are you trying to achieve?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

learntsql

524 Posts

Posted - 2009-11-10 : 23:46:55
After restoring original database into another database,i want to clean the data which may contain foreign keys.
Instead trying to drop all objects and then run the script for required objects.
Am i going in right way?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-10 : 23:59:33
I don't understand the purpose of restoring the database and then dropping objects.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-11-11 : 00:41:15
quote:
Originally posted by learntsql

After restoring original database into another database,i want to clean the data which may contain foreign keys.
Instead trying to drop all objects and then run the script for required objects.
Am i going in right way?



In this case you can make use of Generate SQL Script feature by seleting required objects and run it in the target database

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -