Reverse Engineer Database Automatically Using SAP PowerDesigner

Is it possible to automatically create (running a script) a physical database model of the (.pdm) by doing a reverse engineer of a sybase 15.7 server?

I know I can do it manually, but is it possible to do it via script?


I'm using something like this to reverse a database.

   dim path
   path = EvaluateNamedPath("%WORKDIR%\cnctjdbcasa.dcp")
   ReverseModel path, "dbuser", "dbpassword", "Sybase SQL Anywhere 12"

Function ReverseModel(cnxDSN, cnxUSR, cnxPWD, sDBMS)
   Dim mdl
   Set mdl = CreateModel(PdPDM.cls_Model, "|DBMS=" & sDBMS)
   set ReverseModel = mdl
   If mdl is Nothing Then
      MsgBox "Error: Unable to create a physical model for " & sDBMS, 0, "ReverseTest"
      Exit Function
   End If

   ' connect to the database with connection parameters
   If Not(mdl.ConnectToDatabase(cnxDSN, cnxUSR, cnxPWD)) Then
      MsgBox "Error: Unable to connect to " & cnxDSN & " - " & cnxUSR, 0, "ReverseTest"
      set ReverseModel = nothing
      mdl.Close false
      exit Function
   End If

   ' reverse tables from ODBC
   Dim opt
   Set opt = mdl.GetPackageOptions()
   opt.ReversedScript = False
   opt.ReverseAllTables = true
   opt.ReverseAllViews = false
   opt.ReverseAllStorage = false
   opt.ReverseAllTablespace = false
   opt.ReverseAllDomain = false
   opt.ReverseAllUser = false
   opt.ReverseAllProcedures = false
   opt.ReverseAllTriggers = false
   opt.ReverseAllSystemTables = false
   opt.ReverseAllSynonyms = false
   ' not interested in table details
   opt.ReversePrimaryKey = false
   opt.ReverseForeignKey = false
   opt.ReverseAlternateKey = false
   opt.ReverseIndex = false
   opt.ReverseCheck = false
   opt.ReversePhysicalOptions = false
   opt.ReverseStatistics = false
   opt.ReverseTablPermissions = false

End Function

Need Your Help

How to make a html5 game as apk file in android

android html5

I have done a HTML5 game and now I want to package the game into an apk file in Android.

Cocoa: most lightweight way to synchronize access to a double?

c cocoa thread-safety

In my Cocoa/iOS application I have a static double variable (let's call it foo) which must be:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.