Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2002
    Location
    Colorado
    Posts
    6

    Unanswered: Extract Schema DDL for Sybase

    Being an "accidental" DBA for sybase (my training is in oracle) I need to know if there is a script that can be run to generate a createdb script with all the tables, indexes, triggers, and stored procedures from a sybase database version 10.x. Any ideas out there? It is a fairly simple matter in oracle using the data dictionary views but I can't find the similar tables in sybase. Would appreciate any help. Thanks.

  2. #2
    Join Date
    Nov 2002
    Posts
    4

    Smile Re: Extract Schema DDL for Sybase

    Originally posted by kneebuck
    Being an "accidental" DBA for sybase (my training is in oracle) I need to know if there is a script that can be run to generate a createdb script with all the tables, indexes, triggers, and stored procedures from a sybase database version 10.x. Any ideas out there? It is a fairly simple matter in oracle using the data dictionary views but I can't find the similar tables in sybase. Would appreciate any help. Thanks.

    As I know, there is one way to get Stored Procedure definitions using "defncopy" , Never tried this to get Table definitions.

    Syntax :

    defncopy -U<username> -S <srvrname> -P <passwd> -I <interfaces> out <outputfile name > <dbname> procedureName

    Please let me know if any more info is required

    Cheers,
    Kenny

  3. #3
    Join Date
    Sep 2002
    Location
    Colorado
    Posts
    6
    Thanks Kenny. I have heard about defncopy but I haven't used it yet. I will see what I can get from it. I also found the sysobjects table that seems to have links to syscolumns and sysindexes that will help me derive the schema info I need. I appreciate your posting. It may help me get the rest of the objects.

  4. #4
    Join Date
    Sep 2002
    Posts
    8
    Defncopy id ok for proc, trigger and view

    Tables and index are different story..

    If you want to get your hands dirty
    Here some thing to start

    Get the table names and object ids from system table sysobjects where type =’U’ and name and all column details from syscolumns table.
    Check out the ddl for the system proc “sp_help” its in sybsystemproc databases.
    It has all the details to get started…

    Well if you are looking for one time deal. Use any dba tools like Dbartsion, desktop dba, dba proc, etc..

    hope this help

  5. #5
    Join Date
    Sep 2002
    Location
    Colorado
    Posts
    6
    Thank you for the details on the sybsysprocs table to extract the DDL. I will give it a shot. I was going to use one of the 3rd party tools since this is a one-time deal but the ones I tried weren't compatible with this old version of sybase (10.x). That's why I got stuck. Thanks again for your help!

  6. #6
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Try to use Sybase Central to extract a subset of your model (don't try with a full db !)

    Else, use PowerDesigner using Sybase ASE 11.x driver. If it's not significant with your v.10, you've the possibility to create your own dictionnary and changing the RDBMS profile to "paste" with v.10.

    The other way is to find an "old" version of PowerDesigner (v.6 ?), compatible with Sybase SQL Server 10

  7. #7
    Join Date
    Sep 2002
    Location
    Colorado
    Posts
    6
    Thanks for your comments. I actually have an old copy of PowerDesigner 6 but the ODBC connections all fail when trying to connect to the database. I have tried loading it on different computers and still no go. However, I was able to get the info I needed so I guess I can close this thread. I appreciate your input.

Posting Permissions

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