Skip to Content

SQL Anywhere, on-demand edition Adding Databases

Module 2 - Adding Databases

In this module, you will walk through how to add, start, and stop databases in the SAP Sybase SQL

Anywhere, on-demand edition cloud.

Pre-requisites

It is expected that you have created a SQL Anywhere, on-demand edition cloud with a minimum of three cloud servers. Refer to Module 1 for information on installing and starting a cloud.

This module requires that you have the SQL Anywhere Developer Edition installed.

Adding a Database

When a tenant database is added to the on-demand edition cloud, the cloud server and host it runs on are chosen automatically. However, you have the option of specifying a target cloud server on which the database runs. Also, after a database has been added, it can be moved manually to other cloud servers and hosts. More on this will be covered in later modules.

A tenant database can be added to the on-demand edition cloud in two ways. If the database has dbspaces or is larger than 100 MB, the Cloud Add Tenant Database utility should be used. Instructions can be found at http://dcx.sybase.com/index.html#cloud100/en/dbcloud/cloud-dbcloudadd-utility.html. If the database is less than 100 MB and does not have dbspaces, the on-demand edition Console can be used.

If you do not have a database to add, you can use the initialization utility dbinit to create a new one. dbinit is available as part of the SQL Anywhere Developer Edition. A download link for the SQL Anywhere Developer Edition is available on the page from which you downloaded SQL Anywhere, on-demand edition. Instructions on using the initialization utility can be found at http://dcx.sybase.com/index.html#1201/en/dbadmin/dbinit.html and instructions on creating a sample database can be found at http://dcx.sybase.com/index.html#1201/en/saintro/fg-sademo-s-4849074.html

  1. Start the Cloud Console and click on Databases in the left hand navigation panel.
  2. Click Add. This will bring up a dialog that allows you to browse for the database you want to add.
  3. Click Browse to navigate to the location of the database file and select the desired file. The database name that will be displayed in the Cloud Console can be edited as necessary. Encryption keys and log files can be included with the database by clicking the checkboxes beside the respective options and specifying the key or the file. If the database being added has a transaction log file, it should be included or it may not be able to start in the cloud. Click Next.                                                        
  4. Enter the database administrator user ID and password for the selected database to add it to the cloud. Note that the default credentials for a SQL Anywhere database are user: dba, password: sql. The credentials will only be used to verify access to the database and will never be stored in the cloud. Click Next.                                               
  5. Choose a target cloud server if desired. By default on-demand edition automatically selects a cloud server. Click Finish. The upload progress bar will be shown and the dialog will close once complete.
  6. The added database should appear in the database list in the Cloud Console. Examples on how to make connections to the database will be demonstrated in the next module.                                            

Stopping a Database

Stopping the database is also done through the Cloud Console. You may want to stop the database as part of a maintenance process on a host or cloud server or before removing it from the cloud.

  1. In the Cloud Console, click Databases in the left hand navigation pane.
  2. Check the checkbox next to the database(s) you wish to stop.
  3. Click Stop.                                                      
  4. A dialog will appear and ask you to confirm your actions.

The database’s status should appear as Stopping and eventually update to Stopped.

Starting a Database

To restart a database that has been stopped in the cloud:

  1. In the Cloud Console, click Databases in the left hand navigation panel.
  2. Check the checkbox next to the database(s) you wish to start.
  3. Click Start.                                                      
  4. A dialog will appear and ask you to confirm your actions.

The database’s status will immediately appear as Starting and eventually update to Running when it becomes available for connections.

Deleting a Database

Deleting a database from the cloud removes it from the cloud server and the on-demand edition Cloud. To delete a database in the cloud:

  1. In the Cloud Console, click Databases in the left hand navigation panel.
  2. Check the checkbox next to the database(s) you wish to drop.
  3. Click Stop.
  4. Once the database has entered the Stopped state, click Delete from the Other Actions drop down menu.
Tags:
Former Member

No comments