Dear subscribers,
Does anyone happen to be aware of a tested script generator that would
create a script that would contain statements in the right order for
dropping indexes, keys, and DRI of all tables in a database?
Many thanks.You can use the EM Generate scripts utility. If you are concerned about
dependencies, you can use CREATE SCHEMA DDL to generate the script without
worrying about the order in which the dependant objects are created (with
the exception for views dependent on views). Pl. refer to SQL Server Books
Online for more details on CREATE SCHEMA.
--
- Anith
( Please reply to newsgroups only )|||Thanks Anith,
From BOL: CREATE SCHEMA provides a way to create tables and views and to
grant permissions for objects with a single statement. So if I understood it
correctly CREATE SCHEMA is for creating objects, whereas my initial concern
was about dropping objects in the right order, not their creation.
Regarding EM - it seems that it only generates Transact-SQL statements to
create indexes/keys/dri that currently exist for any selected tables, not to
drop them.
Or have I misread that in BOL?
Many thanks.
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:OpMDmUnkDHA.1708@.TK2MSFTNGP12.phx.gbl...
> You can use the EM Generate scripts utility. If you are concerned about
> dependencies, you can use CREATE SCHEMA DDL to generate the script without
> worrying about the order in which the dependant objects are created (with
> the exception for views dependent on views). Pl. refer to SQL Server Books
> Online for more details on CREATE SCHEMA.
> --
> - Anith
> ( Please reply to newsgroups only )
>|||On Wed, 15 Oct 2003 11:41:48 +0300, "Oskars Salnins"
<osalnins@.inbox.lv> wrote:
>Thanks Anith,
>From BOL: CREATE SCHEMA provides a way to create tables and views and to
>grant permissions for objects with a single statement. So if I understood it
>correctly CREATE SCHEMA is for creating objects, whereas my initial concern
>was about dropping objects in the right order, not their creation.
>Regarding EM - it seems that it only generates Transact-SQL statements to
>create indexes/keys/dri that currently exist for any selected tables, not to
>drop them.
>Or have I misread that in BOL?
Try it and see.
hint: the Formatting tab item "Generate the drop <object> command for
each object" may be relevant!
J.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment