DbSchema for SQL Anywhere Database

DbSchema is a powerful database management and design tool for SQL Anywhere. 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" or "New Model Connected to the Database" will let you select your database and open the Connection Dialog.

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

  2. Configure the Connection
  3. 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.

    Enter the host name, the authentication details, select your database as described in the Connection Dialog page.

  4. Troubleshoot Firewall Issues
  5. 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, change the directory in SqlAnywhere install folder bin64 and execute :
C:\Program Files\SQL Anywhere 17\Bin64>dbsrv17.exe -x tcpip -n server1
This should start the network service.

Install SqlAnyhwere Tutorial

SqlAnywhere can be downloaded and installed on a 60-days trial basis from internet. 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.

From Sybase Central you can create a new database. You will have to enter the file location. Then you will have to create a service for it. You can do this by selecting the SqlAnywhere:

How to create new SqlAnywhere database

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:

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

Next step is to start the Network tools. They can be found from the Start menu in the 'SqlAnywhere/ Tools / Network Tools Demo'. Starting them will start a listener on port 2638. Use the Ping button from the DbSchema Connection dialog to check the port.

One other way is to start the service tag:

SQL Central

The service can be started also from the Command Prompt using the command:

    dbsrv16.exe
Just execute this and a dialog will ask for the database location and server name. Then you can connect to it from the SQL Central using the server name. If you get permission errors try to run the Command Prompt as Administrator. There is no need to create a server for the created database, just a Service is enough.

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.';