Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    12

    Unanswered: Generate all indexes

    Hi

    I am trying to generate DDL for all indexes for all tables in a database.

    I used the following command:

    ddlgen -Usa -P -SHARBOR:1955 -TI -Npubs2.%.%.%

    I will encounter the following error:

    Object Not Found in Server

    DDLGenerator Ends.

    I tried the following command and it doesn;t work too.

    ddlgen -Usa -P -SHARBOR:1955 -TI -N%

    It only works if I specified N<dbname>.<owner>.<index_name>.%

    How do I generate the DDL for all indexes in the database?

    My sybase version is 12.5.3.

    Thanks!

  2. #2
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    select "ddlgen -Usa -P -SHARBOR:1955 -TI -N" + db_name() + ".dbo." + name from sysindexes

Posting Permissions

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