DbSchema for SqlAnywhere Databases

DbSchema is a powerful database management and design tool for SqlAnywhere. It offers features such as visual schema design, team collaboration with GIT, schema deployment and HTML schema documentation.

How to Connect to SQL Anywhere Database

  1. Access the Connection Dialog

    Choose "Connect to the database" from the Welcome Pane and then select SQL Anywhere database to open the Connection Dialog.

    Main Screen DbSchema

    DbSchema automatically downloads the JDBC driver to connect to your database.

  2. Configure the Connection
  3. Important: First you have to check if the Network Server in the SQL Central is running. If you get any error, read this documentation.

    1. In the Connection Dialog window, select the JDBC URL you want to connect with. If your database is running in the cloud, choose Edit Manually and insert the JDBC URL from the cloud console.
    2. Enter the host name, the authentication username and password from your SQL Anywhere database, then select your database you want to work with.
    3. Check the "Ping" button to see if the port is reachable!
    4. Connect SqlAnyhwere with DbSchema

    5. Troubleshoot Firewall Issues
    6. If you encounter connection issues, it may be due to firewall settings. Read how to enable Firewall Connections.
    Remember to enable Windows Firewalls Firewalls & anti-viruses may block database connections.

    Enable Connectivity by Starting SqlAnywhere Network Service

    To start a network database server open the command prompt with administrator privileges, change the directory in SqlAnywhere install folder bin64 and execute :
    C:\Program Files\SQL Anywhere 17\Bin64>dbsrv17.exe -x tcpip -n servername
    This should start the network service.

    Install SqlAnyhwere Tutorial

    1. SqlAnywhere can be downloaded and installed on a trial basis from here. After installing the SQL Central will start.

      How to download and install SqlAnywhere

      The default database user is 'DBA' with password 'sql'. The demodb may be installed.

    2. From SQL Central, you can create a new database by navigating to Tools > SQL Anywhere 17 > Create a New Database. During this process, you'll need to specify the location for the database file and the log files, ideally in the same folder. Then you will have to create a service for it. You can do this by selecting the SqlAnywhere:
    3. How to create new SqlAnywhere database

    4. The next step is to install a Service ( windows service ) for this database, which means that the db always will be running.

      How to configure SqlAnywhere services

      A typical service configuration looks like this:

    5. How to install an SqlAnywhere service

      • The first -n is the name of the service
      • The -x is there to tell the service to listen after tcpip connections
      • The path is the path to the database on disc
      • The last -n is the name of the database (optionally)
      • If you get any error, configure the service with this command to see the logs, in the folder you have your database file:
        -o C:\Users\roxan\temp\log.log

      Important: A restart of the computer may be required after configuring the "services".

    6. You must copy the dbjdbc17.dll file from SQL Anywhere 17\Bin64 to DbSchema folder: C:\Program Files\DbSchema\jre\bin
    7. How to configure DDL Exception in DbSchema

      How to configure DDL Exception in DbSchema

    8. Now, click "Connect," select the schemas you want to reverse-engineer, and start improving your database with DbSchema!
    9. Sql Anywhere with DbSchema

    Some useful queries:
    // list dbspaces ( are tablespaces with associated files )
    select * from sysdbspace;
    CREATE USER bubu IDENTIFIED BY bubu;
    GRANT CONNECT TO bubu;
    GRANT RESOURCE TO bubu;
    GRANT CREATE on system to bubu;
    COMMENT ON USER bubu IS 'Test user to test some system features without DBA privileges.';