Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2002
    Posts
    229

    Unanswered: Automated script generation

    I often create scripts from SQL Server 2000 Enterprise Mgr the same way: I select all tables, check Indexes, check Constraints, check Windows text, then I go. Is it possible to automate this task further, for example running the scripting from a Stored Proc?

  2. #2
    Join Date
    Oct 2002
    Posts
    369
    RE: I often create scripts from SQL Server 2000 Enterprise Mgr the same way: I select all tables, check Indexes, check Constraints, check Windows text, then I go. Is it possible to automate this task further, for example running the scripting from a Stored Proc?

    Q1 Is it possible to automate this task further, for example running the scripting from a Stored Proc?

    A2 Yes, though for some tasks (particularly with previous versions) you may have to use cursors.

  3. #3
    Join Date
    Jul 2002
    Posts
    229
    I could, fairly quickly, write a SP that reads some system tables and do the scripting I need itself.

    But, is there some way to make Enterprise Mgr to do it, without really having to write a program?

  4. #4
    Join Date
    Jul 2002
    Posts
    229
    Originally posted by Coolberg
    I could, fairly quickly, write a SP that reads some system tables and do the scripting I need itself.
    Well, not quickly I realize, because I need to put the ALTER TABLE ... DROP CONSTRAINT statements in the proper order.
    Or could I do a ALTER TABLE ... NOCHECK ALL on all tables...?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •