aqua data studio 4.5 documentation table of...

73
Aqua Data Studio 4.5 Documentation Table of Contents I. Getting Started II. Installation III. JDBC Drivers A. Oracle B. DB2 UDB C. SQL Server D. Sybase ASE E. Sybase Anywhere F. Informix G. PostgreSQL H. MySQL IV. Character sets V. Registering Servers VI. Query Window A. Basics B. Shortcut Keys C. Toolbar D. Server Side Comments E. SQL Automation F. Variable Binding G. Results H. Save Results VII. Procedure Editor VIII. Visual Explain Plan A. Basics B. Explain Plan C. Explain Diagram D. Whiteboard IX. Browser & Scripting X. Visual Editing XI. Table Editor XII. SQL History XIII. Import & Export Tool XIV. ER Diagram XV. Script Generator XVI. Options

Upload: phungtu

Post on 12-Apr-2018

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Aqua Data Studio 4.5 Documentation

Table of Contents

I. Getting Started

II. Installation

III. JDBC DriversA. OracleB. DB2 UDBC. SQL ServerD. Sybase ASEE. Sybase AnywhereF. InformixG. PostgreSQLH. MySQL

IV. Character sets

V. Registering Servers

VI. Query WindowA. BasicsB. Shortcut KeysC. ToolbarD. Server Side CommentsE. SQL AutomationF. Variable BindingG. ResultsH. Save Results

VII. Procedure Editor

VIII. Visual Explain PlanA. BasicsB. Explain PlanC. Explain DiagramD. Whiteboard

IX. Browser & Scripting

X. Visual Editing

XI. Table Editor

XII. SQL History

XIII. Import & Export Tool

XIV. ER Diagram

XV. Script Generator

XVI. Options

Page 2: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

I. Getting Started

Welcome to Aqua Data Studio Documentation - Below you will find 6 quick stepsto getting you started with Aqua Data Studio. Once you have your database querytool up and running you may continue into the documentation to understand thedifferent features of Aqua Data Studio.

Downloading - You may download the appropriate package for your OperatingSystem by clicking on the package in the download section. If you experience anydownload problems or just slow download speeds please email us so that we mayupgrade our servers and bandwidth. Email us at (support (at) aquafold.com)

Installation - The basics for installing is to decompress and unarchive thepackage and then execute one of the following ... datastudio.exe (for Windows),datastudio(.bat/.sh) (for console with your own JVM), or datastudio-bundled(.bat/.sh) (for console with bundled JVM). If you have any issues you can check outthe step-by-step instructions with screenshots here (instruction/screenshots).

Connecting to a database - If you have any issues connecting to yourdatabase you may view the sample registration screenshots provided in the galleryfor your specific database (registration/screenshots). If you still experience problemsconnecting to your database you should review the JDBC driver and the registrationsection of the documentation.

Opening a Query window - Once you have registered a server you may selectthe server and right-click on it for a pop-menu and select "Query Analyzer" or youmay select the server and then select Menu:Server->Query Analyzer (CTRL-Q). Thiswill open a query window which will allow you to execute your queries or multiplestatements separated by "GO" or "/" (example).

Correct way to use Query Analyzer - Do not assume you know how to useQuery Analyzer. Please take a look at the correct way of using Query Analyzer. (Howto use Query Analyzer)

Problems? - If you have any problems which you can't resolve please email usso that we may assist you and/or fix the problem for other users. Email us at(support (at) aquafold.com).

Page 3: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

II. Installation

Open Terminal/Command Window - The first step is to open aTerminal/Command window.

Linux OSX Windows

Decompress/Unarchive Package - Next step is to decompress and unarchivethe installation package.

For Windows you need to open the package file with Winzip and decompress into aselected directory.

For Linux you will need to enter the following commands in the terminal window.- Change the directory to the location of the downloaded file.>> cd /home/username/downloads- Uncompress the package.>> gzip -d adstudio.tar.gz- Unarchive the archive file>> tar -xvf adstudio.tar

In OSX your package will automatically be decompressed by StuffIt, so you will onlyneed to change into the correct directory.- Change the directory to the location of the downloaded file.>> cd ./Desktop/datastudio

Linux OSX Windows

Execute command/shell script - The final step is to execute the shell script orbatch file. For Windows you may execute it by double clicking it in the windows

Page 4: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

explorer or executing it from the command window (e.g. >> datastudio.bat). ForLinux or OSX you may execute the shell script by typing the command in theterminal window (e.g. >> ./datastudio.sh)

Linux OSX Windows

Page 5: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

III. JDBC Drivers

JDBC Driver Usage - Aqua Data Studio uses JDBC drivers to make databaseconnections to the appropriate database. By default, Aqua Data Studio comespackaged with an appropriate JDBC driver for all supported databases. The includeddrivers work for most database versions and setups. In specific configurations youmay be required to update the JDBC driver in your Aqua Data Studio installation withthe latest driver from the database vendor. Below is a list of databases, thecorresponding issues that may arise and the appropriate action to take to resolve theissue.

DB2 7.2 JDBC Driver - DB2 7.2 is the database which has the most connectionissues. JDBC drivers for database version are not compatible, neither are theycompatible across fixpacks. Updating your DB2 JDBC driver to the version which youare using is always a good idea. The DB2 Server installation provides JDBC driversfor the version and fixpack in use. You may copy the provided JDBC driver andoverwrite the driver provided by ADS. You can copy the /sqllib/java/db2java.zip thatcomes with your installation and overwrite the /ADS_INSTALLATION/lib/db2java.jarfile.

- NOTE: The DB2 7.2 JDBC driver does not connect directly to the DB2 Server, but toa proxy server which is installed with the DB2 Server. This proxy server can bestarted with the db2jstrt[.exe], which defaults to port 6789. The process is enabledby default in most installations.

Vendor: IBMDriver URL: DB2 Server Installation ([DB2 Install]\java\db2java.zip)Driver Location (Windows/Linux): [ADS_INSTALL]\lib\db2java.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/db2java.jar

DB2 8.1 & 8.2 JDBC Driver - The DB2 JDBC drivers included with ADS work acrossall 8.x versions of DB2. There is no need to change or update this driver.

Vendor: IBM (JDBC Type 4 Driver)Driver URL: http://www.ibm.com/support/us/Driver Location (Windows/Linux): [ADS_INSTALL]\lib\db2jcc.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/db2jcc.jar

Oracle JDBC Drivers - Oracle JDBC drivers provide compatibilty between differentversion of the Oracle server. Oracle JDBC/OCI drivers do not provide supportbetween OCI libraries. The JDBC driver included with ADS supports nativeconnections to Oracle 10g/9i/8i, but only OCI connections with the 10g clientsoftware. If you have the 8i/9i OCI client drivers installed on your machine and youwould like to use them with ADS then you will need to install the Oracle 8i/9i JDBCdriver, which has support for 8i/9i OCI libraries.

- For Oracle you can copy the /oraxx/jdbc/lib/classes12.jar that comes with yourinstallation and overwrite the /ADS_INSTALLATION/lib/oracle.jar file.

Note OSX Installations: OCI Connections are not supported on OSX. There is noneed to change or update the drivers on OSX.

Page 6: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Vendor: OracleDriver URL: [Free Registration Required]http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.htmlDriver Location (Windows/Linux): [ADS_INSTALL]\lib\oracle.jar & [ADS_INSTALL]\lib\nlscharset12.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/oracle.jar & /Aqua Data Studio/Contents/Resources/Java/nlscharset12.jar

Microsoft SQL Server JDBC Drivers - The jTDS JDBC (v1.0) drivers included withADS work across all versions of SQL Server. There is no need to change or updatethis driver.

Vendor: jTDS Open Source ProjectDriver URL: http://sourceforge.net/project/showfiles.php?group_id=33291Driver Location (Windows): [ADS_INSTALL]\lib\jtds.jar & [ADS_INSTALL]\ntlmauth.dllDriver Location (Linux): [ADS_INSTALL]\lib\jtds.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/jtds.jar

PostgreSQL JDBC Drivers - The PostgreSQL JDBC (v8.0.401) drivers included withADS work across all versions of PostgreSQL from 7.2 to 8.0. PostgreSQL serverreleases are frequent, and may sometimes require updating the JDBC driver.

Vendor: PostgreSQLDriver URL: http://jdbc.postgresql.org/download.htmlDriver Location (Windows/Linux): [ADS_INSTALL]\lib\postgresql.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/postgresql.jar

MySQL JDBC Drivers - The MySQL JDBC (v3.1.10) drivers included with ADS workacross all versions of MySQL from 3.x to 4.1. MySQL server releases are veryfrequent, and may sometimes require updating the JDBC driver.

Vendor: MySQLDriver URL: http://www.mysql.com/products/connector/j/Driver Location (Windows/Linux): [ADS_INSTALL]\lib\mysql.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/mysql.jar

Sybase Anywhere JDBC Drivers - The Sybase Anywhere JDBC drivers includedwith ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is noneed to change or update this driver.

Vendor: Sybase (jConnect 6.0)Driver URL: http://www.sybase.com/downloadsDriver Location (Windows/Linux): [ADS_INSTALL]\lib\jconnect60.jar.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/jconnect60.jar

Sybase JDBC Drivers - The Sybase JDBC drivers included with ADS work across allversions of Sybase from 11.0 to 12.5. There is no need to change or update thisdriver.

NOTE: For your Sybase JDBC driver to work properly, your Sybase server must have

Page 7: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

the latest EBT/Maintenance patches applied to them. The sql_server_xxx.sql scriptscontain metadata required by the JDBC drivers.

Vendor: Sybase (jConnect 6.0)Driver URL: http://www.sybase.com/downloadsDriver Location (Windows/Linux): [ADS_INSTALL]\lib\jconnect45.jar &[ADS_INSTALL]\lib\jconnect55.jar & [ADS_INSTALL]\lib\jconnect60.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/jconnect45.jar &/Aqua Data Studio/Contents/Resources/Java/jconnect55.jar & /Aqua DataStudio/Contents/Resources/Java/jconnect60.jar

Informix JDBC Drivers - The Informix JDBC drivers included with ADS work acrossall versions of Informix. There is no need to change or update this driver.

Vendor: IBMDriver URL: http://www.iiug.org/home.htmlDriver Location (Windows/Linux): [ADS_INSTALL]\lib\ifxjdbc.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/ifxjdbc.jar

Page 8: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

A. Oracle JDBC Drivers

Oracle JDBC Drivers - Oracle JDBC drivers provide compatibilty between differentversion of the Oracle server. Oracle JDBC/OCI drivers do not provide supportbetween OCI libraries. The JDBC driver included with ADS supports nativeconnections to Oracle 10g/9i/8i, but only OCI connections with the 10g clientsoftware. If you have the 8i/9i OCI client drivers installed on your machine and youwould like to use them with ADS then you will need to install the Oracle 8i/9i JDBCdriver, which has support for 8i/9i OCI libraries.

Note OSX Installations: OCI Connections are not supported on OSX. There is noneed to change or update the drivers on OSX.

You may locate the latest Oracle JDBC drivers at the following location ...

Vendor: OracleDriver URL: [Free Registration Required]http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

You may locate the JDBC drivers for your installed version of Oracle in the Oracleserver or Oracle client installations. Below is a directory listing of the driver files inthe [ORACLE_HOME]\jdbc\lib directory. The ojdbc14.jar file is the Oracle JDBC driverrequired by ADS and the nls_charser12.jar is the language pack for the JDBC driver.If you are using Oracle 8i then the ojdbc14.jar file will not exist but may besubstituted by the classes12.jar or classes12.zip file.

C:\oracle92\ora92\jdbc\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\oracle92\ora92\jdbc\lib

02/04/2003 06:34p DIR .02/04/2003 06:34p DIR ..04/26/2002 12:47p 1,033,402 classes111.jar04/26/2002 12:47p 1,043,528 classes111.zip04/26/2002 12:47p 1,371,600 classes111_g.jar04/26/2002 12:47p 1,381,728 classes111_g.zip04/26/2002 12:47p 1,196,109 classes12.jar04/26/2002 12:47p 1,207,068 classes12.zip04/26/2002 12:47p 1,201,552 classes12dms.jar04/26/2002 12:47p 1,438,406 classes12dms_g.jar04/26/2002 12:47p 1,432,813 classes12_g.jar04/26/2002 12:47p 1,443,734 classes12_g.zip04/26/2002 12:47p 1,781,005 nls_charset11.jar04/26/2002 12:47p 1,810,518 nls_charset11.zip04/26/2002 12:47p 1,781,898 nls_charset12.jar04/26/2002 12:47p 1,811,415 nls_charset12.zip04/26/2002 12:47p 36,640 ocrs12.jar04/26/2002 12:47p 36,664 ocrs12.zip04/26/2002 12:47p 1,174,976 ojdbc14.jar

Page 9: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

04/26/2002 12:47p 1,383,922 ojdbc14_g.jar 18 File(s) 22,566,978 bytes 2 Dir(s) 35,225,325,568 bytes free

C:\oracle92\ora92\jdbc\lib>

To update the ADS JDBC drivers you need to overwrite the ADS oracle.jar file withojdbc14.jar or classes12.zip/.jar, and overwrite the nlscharset12.jar withnls_charset12.jar. Below is a listing of the Aqua Data Studio library directory[ADS_HOME]\lib ...

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;

Page 10: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;

.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;

.\lib\jconnect55.jar;.\lib\mail.jar;

.\lib\activation.jar;.\lib\xmlparserv2.jar;

.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 11: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

B. DB2 JDBC Drivers

DB2 7.2 JDBC Driver - DB2 7.2 is the database which has the most connectionissues. JDBC drivers for database version are not compatible, neither are theycompatible across fixpacks. Updating your DB2 JDBC driver to the version which youare using is always a good idea. The DB2 Server installation provides JDBC driversfor the version and fixpack in use. You may copy the provided JDBC driver andoverwrite the driver provided by ADS. You can copy the /sqllib/java/db2java.zip thatcomes with your installation and overwrite the /ADS_INSTALLATION/lib/db2java.jarfile.

- NOTE: The DB2 7.2 JDBC driver does not connect directly to the DB2 Server, but toa proxy server which is installed with the DB2 Server. This proxy server can bestarted with the db2jstrt[.exe], which defaults to port 6789. The process is enabledby default in most installations.

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\db2java.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/db2java.jar

You may locate the latest DB2 JDBC drivers at the following location ...

Vendor: IBMDriver URL: DB2 Server Installation ([DB2 Install]\java\db2java.zip)

You may locate the JDBC drivers for your installed version of DB2 in the DB2 serveror DB2 client installations. Below is a directory listing of the driver files in the[DB2_INSTALL]\java directory. The db2java.zip file is the DB2 JDBC driver requiredby ADS. This is the file which you need to use to overwrite the db2java.jar file.

C:\Program Files\SQLLIB\java>dir Volume in drive C has no label. Volume Serial Number is 7C2B-F9B7

Directory of C:\Program Files\SQLLIB\java

09/03/2002 12:39p DIR .09/03/2002 12:39p DIR ..06/17/2003 07:02p 554,911 cc_cmn.jar06/17/2003 07:02p 266,631 cc_nav.jar06/17/2003 06:58p 809,313 common.jar03/07/2003 07:20p 234,244 databean.jar06/27/2003 04:23p 1,146,367 db2java.zip06/18/2003 04:37a 5,342 db2vcsql.jar09/03/2002 11:21a DIR images09/03/2002 11:19a DIR java1209/03/2002 12:36p DIR jdk06/17/2003 07:01p 239,966 jgraph.jar09/03/2002 12:35p DIR jre09/03/2002 12:40p DIR prime06/17/2003 06:22p 338,990 runtime.zip06/17/2003 06:58p 1,253,896 sqlasst.jar

Page 12: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

06/17/2003 06:22p 1,671,552 sqlj.zip06/17/2003 09:29p 2,458,220 swingall.jar 11 File(s) 8,979,432 bytes 7 Dir(s) 5,216,145,408 bytes free

C:\Program Files\SQLLIB\java>

DB2 8.1 & 8.2 JDBC Driver - The DB2 JDBC drivers included with ADS work acrossall 8.x versions of DB2. There is no need to change or update this driver.

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\db2jcc.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/db2jcc.jar

You may locate the latest DB2 JDBC drivers at the following location ...

Vendor: IBM (JDBC Type 4 Driver)Driver URL: http://www.ibm.com/support/us/

To update the ADS JDBC drivers you need to overwrite the ADS db2java.jar (for DB27.2) and/or db2jcc.jar and db2jcc_license_cu.jar (for DB2 8.1) files. Below is a listingof the Aqua Data Studio library directory [ADS_HOME]\lib ...

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

Page 13: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 14: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

C. SQL Server JDBC Drivers

Microsoft SQL Server JDBC Drivers - The jTDS JDBC (v1.0) drivers included withADS work across all versions of SQL Server. There shouldn't be any need to changeor update this driver.

If there is a need to update to the latest version of the driver, you may locate thelatest jTDS JDBC driver at the following location ...

Vendor: jTDS Open Source ProjectDriver URL: http://sourceforge.net/project/showfiles.php?group_id=33291

To update the ADS JDBC drivers you need to overwrite the ADS jtds.jar file andntlmauth.dll on the Windows platform. Below is a listing of the Aqua Data Studiolibrary directory [ADS_HOME]\lib ...

Driver Location (Windows): [ADS_INSTALL]\lib\jtds.jar & [ADS_INSTALL]\ntlmauth.dllDriver Location (Linux): [ADS_INSTALL]\lib\jtds.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/jtds.jar

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

Page 15: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 16: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

D. Sybase JDBC Drivers

Sybase JDBC Drivers - The Sybase JDBC drivers included with ADS work across allversions of Sybase from 11.0 to 12.5. There is no need to change or update thisdriver.

NOTE: For your Sybase JDBC driver to work properly, your Sybase server must havethe latest EBT/Maintenance patches applied to them. The sql_server_xxx.sql scriptscontain metadata required by the JDBC drivers.

You may locate the latest Sybase JDBC drivers at the following location ...

Vendor: Sybase (jConnect 4.5/5.5/6.0)Driver URL: http://www.sybase.com/downloads

To update the ADS JDBC drivers you need to overwrite the ADS jconnect45.jarand/or jconnect55.jar and/or jconnect60.jar. Below is a listing of the Aqua DataStudio library directory [ADS_HOME]\lib ...

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\jconnect45.jar &[ADS_INSTALL]\lib\jconnect55.jar & [ADS_INSTALL]\lib\jconnect60.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/jconnect45.jar &/Aqua Data Studio/Contents/Resources/Java/jconnect55.jar & /Aqua DataStudio/Contents/Resources/Java/jconnect60.jar

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes

Page 17: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 18: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

E. Sybase Anywhere JDBC Drivers

Sybase Anywhere JDBC Drivers - The Sybase Anywhere JDBC drivers includedwith ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is noneed to change or update this driver.

You may locate the latest Sybase JDBC drivers at the following location ...

Vendor: Sybase (jConnect 6.0)Driver URL: http://www.sybase.com/downloads

To update the ADS JDBC drivers you need to overwrite the ADS jconnect45.jarand/or jconnect55.jar & jconnect60.jar. Below is a listing of the Aqua Data Studiolibrary directory [ADS_HOME]\lib ...

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\jconnect60.jar.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/jconnect60.jar

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh and

Page 19: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

datastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 20: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

F. Informix JDBC Drivers

Informix JDBC Drivers - The Informix JDBC drivers included with ADS work acrossall versions of Informix. There is no need to change or update this driver. You maylocate the latest Informix JDBC drivers at the following location ...

Vendor: IBMDriver URL: http://www.iiug.org/home.html

To update the ADS JDBC drivers you need to overwrite the ADS ifxjdbc.jar file. Belowis a listing of the Aqua Data Studio library directory [ADS_HOME]\lib ...

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\ifxjdbc.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/ifxjdbc.jar

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

Page 21: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 22: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

G. PostgreSQL JDBC Drivers

PostgreSQL JDBC Drivers - The PostgreSQL JDBC (v8.0.401) drivers included withADS work across all versions of PostgreSQL from 7.2 to 8.0. PostgreSQL serverreleases are frequent, and may sometimes require updating the JDBC driver. You may locate the latest PostgreSQL JDBC drivers at the following location ...

Vendor: PostgreSQLDriver URL: http://jdbc.postgresql.org/download.html

To update the ADS JDBC drivers you need to overwrite the ADS postgresql.jar file.Below is a listing of the Aqua Data Studio library directory [ADS_HOME]\lib ...

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\postgresql.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/postgresql.jar

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

Page 23: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 24: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

H. MySQL JDBC Driver

MySQL JDBC Drivers - The MySQL JDBC (v3.1.10) drivers included with ADS workacross all versions of MySQL from 3.x to 4.1. MySQL server releases are veryfrequent, and may sometimes require updating the JDBC driver. You may locate the latest MySQL JDBC drivers at the following location ...

Vendor: MySQLDriver URL: http://www.mysql.com/products/connector/j/

To update the ADS JDBC drivers you need to overwrite the ADS mysql.jar file. Belowis a listing of the Aqua Data Studio library directory [ADS_HOME]\lib ...

Driver Location (Windows/Linux): [ADS_INSTALL]\lib\mysql.jarDriver Location (OSX): /Aqua Data Studio/Contents/Resources/Java/mysql.jar

C:\Program Files\Aqua Data Studio 4.0\lib>dir Volume in drive C is Local Disk Volume Serial Number is 108C-AA92

Directory of C:\Program Files\Aqua Data Studio 4.0\lib

06/06/2005 03:35p DIR .06/06/2005 03:35p DIR ..06/25/2002 01:07p 54,368 activation.jar02/08/2005 08:18a 5,217,547 datastudio.jar06/27/2003 04:23p 1,146,367 db2java.jar08/24/2004 02:05p 1,077,696 db2jcc.jar08/15/2004 09:48p 1,013 db2jcc_license_cu.jar06/07/2002 08:27a 531,797 ifxjdbc.jar07/21/2002 10:45p 303,246 jconnect45.jar04/30/2004 02:20a 896,049 jconnect55.jar01/25/2005 08:35p 285,111 jtds.jar08/28/2002 02:58p 305,434 mail.jar01/21/2005 07:47p 1,773,208 mysql-jdbc.zip12/23/2004 08:38p 391,434 mysql.jar03/12/2005 10:27p 1,781,898 nlscharset12.jar03/12/2005 10:27p 1,196,109 oracle.jar01/12/2005 07:30p 286,005 postgresql.jar09/23/2003 01:47p 119,947 xdb.jar09/23/2003 01:47p 660,890 xmlparserv2.jar 21 File(s) 22,720,504 bytes 2 Dir(s) 35,225,890,816 bytes free

C:\Program Files\Aqua Data Studio 4.0\lib>

The Java class path for the drivers are already configured for ADS in thedatastudio.cfg for launching ADS with datastudio.exe and in datastudio.bat/.sh anddatastudio-bundled.bat/.sh for launching ADS from the command line. The contentsof the file are as followed ...

Page 25: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

C:\Program Files\Aqua Data Studio 4.0>type datastudio.cfg..\jre\bin\javaw.exe-Xmx256M -cp ".\lib\datastudio.jar;.\lib\oracle.jar;.\lib\nlscharset12.jar;.\lib\jtds.jar;.\lib\mysql.jar;.\lib\postgresql.jar;.\lib\jconnect45.jar;.\lib\db2java.jar;.\lib\db2jcc.jar;.\lib\db2jcc_license_cu.jar;.\lib\ifxjdbc.jar;.\lib\jconnect55.jar;.\lib\mail.jar;.\lib\activation.jar;.\lib\xmlparserv2.jar;.\lib\xdb.jar" com.aquafold.datastudio.DataStudio

C:\Program Files\Aqua Data Studio 4.0>type datastudio.batSET ADS_PATH=SET ADS_PATH=%ADS_PATH%;.\lib\oracle.jarSET ADS_PATH=%ADS_PATH%;.\lib\nlscharset12.jarSET ADS_PATH=%ADS_PATH%;.\lib\jtds.jarSET ADS_PATH=%ADS_PATH%;.\lib\mysql.jarSET ADS_PATH=%ADS_PATH%;.\lib\postgresql.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect45.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2jcc_license_cu.jarSET ADS_PATH=%ADS_PATH%;.\lib\db2java.jarSET ADS_PATH=%ADS_PATH%;.\lib\ifxjdbc.jarSET ADS_PATH=%ADS_PATH%;.\lib\jconnect55.jar

SET ADS_PATH=%ADS_PATH%;.\lib\xmlparserv2.jarSET ADS_PATH=%ADS_PATH%;.\lib\xdb.jar

SET ADS_PATH=%ADS_PATH%;.\lib\mail.jarSET ADS_PATH=%ADS_PATH%;.\lib\activation.jar

java -cp ".\lib\datastudio.jar;%ADS_PATH%" com.aquafold.datastudio.DataStudio

Page 26: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

IV. Character sets

Character set support - Aqua Data Studio is Unicode compliant and may displayany character set. Although Aqua Data Studio has the capabilities to display anycharacter set, a limitation in your OS fonts, database character set support or a missconfiguration of either may prevent ADS from displaying characters correctly.

Configured Fonts - If your OS does not have Unicode capable fonts you will need toconfigure ADS to use fonts which support the character set you want to display. Youmay configure the fonts used by ADS in File->Options->[General:Appearance]. Hereyou may specify the fonts used for the application, SQL editor, text results and gridresults.

Example fonts which support multi-byte character sets include:

• Traditional Chinese: MingLiU • Simplified Chinese: MS Song or MS Hei • Japanese: MS Gothic • Korean: GulimChe

Database Character set - Configuring your database server and database withthe correct character set support is important in storing and retrieving your datacorrectly. If you need to store data in multiple character sets it is important toconfigure your database with a Unicode character set. Otherwise, it is important toconfigure your database with the character set which supports the data in thecorrect character encoding.

If you have ADS configured with the correct fonts, and your database is configuredwith support for the character sets you are storing, then ADS should have noproblems displaying your data correctly. Please review the documentation fromyour database vendor on database character set support.

Page 27: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

V. Register Servers

Registering Servers - Once you have installed Aqua Data Studio you will need toregister your servers before you get started. Below is a list of descriptions on how toregister a server according to database type. Sometimes there are issues inconnecting to a specific type of database. Each section offers notes in specific toregistering.

Register Oracle Server - If you have any issues connecting to your Oracle instance,make sure that you can ping your server with 'tnsping'. Also, make sure you havethe correct JDBC driver if you are connecting through OCI libraries. (Drivers)

Register DB2 Server - Before connecting to your server, make sure you have theappropriate driver for your DB2 version and fixpack.

Register Informix Server - Informix registrations should be straight forward.

Register Microsoft SQL Server - SQL Server registrations should be straightforward.

Windows Single Sign-On - Aqua Data Studio supports trusted single sign-onconnections to SQL Server on the Windows platform. You may specify theauthentication as "Windows Single Sign-On", which will allow ADS to login into aserver using the currently logged in authentication of the OS. This is only supportedon the Windows platform, and not on Linux, OSX or other platform. For otherplatforms use the "Windows Authentication" option.

Windows Authentication - Aqua Data Studio supports trusted connections to SQLServer on non-Windows platforms. You may specify the authentication as "WindowsAuthentication" and specify the Domain/Username and password of the user toauthenticate with.

Connecting to Multiple Instances of SQL Server on the same machine - Whenregistering an SQL Server you may specify in the Hostname text the name of the SQLServer and the Instance name in the format \\ServerName\InstanceNamewithout a port to enable an Instance connection. You may also connect to multipleInstances of SQL Server on the same machine by identifying on what ports each

Page 28: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Instance is running. For SQL Server 2000 you can run the "SQL Server NetworkUtility". You may then select the Instance of SQL Server and make sure the "TCP/IP"protocol is enabled. Then you may select the TCP/IP protocol and click properties,this should tell you the default port.

Once you know the port of each Instance you may register a connection for eachInstance by specifying the hostname and the port for each connection/instance.

Register PostgreSQL Server - If you have issues connecting to your PostgreSQLserver, make sure that you have started your PostgreSQL postmaster with the '-i'option which enables TCP/IP connections. TCP/IP connections are required for ADS toconnect to the PostgreSQL server.

Register MySQL Server - Before connecting to MySQL you will need to GRANTaccess to your user and machine. Because the MySQL JDBC driver uses TCP/IPsockets instead of Unix Domain Sockets the security manager in MySQL server willuse the HOSTS table to determine whether or not the connection should be allowed.To grant your user access use this syntax "GRANT ALL PRIVILEGES ON [dbname].*to '[user]'@'[hostname]' identified by '[password]'" to generate and execute an SQLcommand.

Register Sybase Server - Sybase registrations should be straight forward, althoughyou should make sure your Sybase server has had the Sybase sql_serverXX.sql metadata script applied to it as documented in your Sybase documentation. This script isusually applied during installation by default.

Register Sybase Anywhere Server - Sybase Anywhere registrations should bestraight forward.

Register Generic JDBC & ODBC Server - When registering a server using theGeneric-JDBC connection type, make sure you specify the location of the driver whichyou will be using, with the correct URL and driver name. When registering a Generic-

Page 29: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

ODBC connection make sure that an ODBC datasource has already been created foruse.

• Filter Databases/Schemas: Allows the user to specify the main schemabrowser filter for databases or schemas, on whether to include or exlude all.

• Include Databases/Schemas: A list of databases/schemas to include afterthe main filter is applied.

• Exclude Databases/Schemas: A list of databases/schemas to exclude afterthe main filter is applied.

• Filter Objects: Allows the user to specify the main schema browser filter forobject types, on whether to include or exlude all.

• Include Objects: A list of objects to include after the main filter is applied. • Exclude Exclude Objects: A list of objects to exclude after the main filter is

applied.

• Txn Isolation Level: Support for setting Transaction Isolation Level- TRANSACTION_NONE - A constant indicating that transactions are notsupported.- TRANSACTION_READ_COMMITTED - A constant indicating that dirty readsare prevented; non-repeatable reads and phantom reads can occur.- TRANSACTION_READ_UNCOMMITTED - A constant indicating that dirtyreads, non-repeatable reads and phantom reads can occur.- TRANSACTION_REPEATABLE_READ - A constant indicating that dirty readsand non-repeatable reads are prevented; phantom reads can occur.- TRANSACTION_SERIALIZABLE - A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented.

• Driver Param: This option is to allow a user to specify extra JDBCparameters that a user might want use in estabilishing a connection.

• Charset: Character set used for the connection. • Set quoted_identifier: Causes connection to follow the SQL-92 rules

regarding quotation mark delimiting identifiers and literal strings. • Set ansi_nulls: Causes connection to follow SQL-92 compliant behavior of

the Equals (=) and Not Equal to (<>) comparison operators when used withnull values.

• Set ansi_null_dflt_on: Causes connection behavior to override defaultnullability of new columns when the ANSI null default option for the databaseis false.

Page 30: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

• Set ansi_padding: Changes connection behavior in the way the columnstores values shorter than the defined size of the column, and the way thecolumn stores values that have trailing blanks in char, varchar, binary, andvarbinary data.

• Set ansi_warnings: Specifies SQL-92 standard behavior for several errorconditions.

Page 31: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

VI. Query Window

A. Basics

Toolbar Functionality - Within the Query Analyzer window you can create a newquery, open a script, save a query, save a query as, save results, print, parse,execute current, and execute edit. The toolbar allows you to find and replace, enableautocompletion, refresh the auto schema and set the maximum results displayed.You can quickly change the database you are analyzing in the dropdown menuabove the edit window. Scripts and SQL Statement separation Separate yourstatements with "GO" or "/" - To correctly use all of QueryAnalyzer's functionality you need to separate your SQLStatements. This allows Aqua Data Studio to quicklyidentify which statement you are working on so that it mayintelligently provide Auto-Completion, Describe, SQLTemplate, and Execute as a script on the currentstatement. If you do not do this you might get theimpression that Aqua Data Studio doesn't work. Check out#2 and #3.

Do not separate your statements with ";" - The reasonAqua Data Studio does not use ";" as a separator for SQLStatements is because PL/SQL and T-SQL may contain ";".To keep the parser fast and simple for Auto-Completionand Describe we do not use it. If you try to use it as aseparator Aqua Data Studio will not be able to identifyyour current statement and will give you the impressionthat Auto-Completion and other features do not work.Executing as a script will also generate errors from theRDBMS unable to understand your statement.

You must separate your SQL Statements - If you donot separate your statements Aqua Data Studio will not beable to identify your current statement or separate themfor script execution. This might give you the impressionthat Aqua Data Studio's features do not work. Auto-Completion - The Query Analyzer provides auto-completion popups for tables, views, synonyms and theircolumns. It determines when to popup tables or columnsaccording to the cursor position in the SQL statement atthe time of popup. Although the query window willintelligently decide when to popup options, you mayactivate the auto-completion feature with the CTRL-SPACEhot key.

Page 32: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Encoding SQL Scripts & Query Results -ADS supportsSQL Scripts encoded in different encoding formats. Whenopenning an SQL Script select the 'File Type' with theappropriate encoding. ADS also supports the saving ofresultsets into different encoding types.

Unicode/Charactersets -ADS supports Unicode andInternational charactersets, but you must make sure youare using the international JRE and that ADS is using afont which supports the characterset you are using. Thebundled JRE which comes with ADS is the Internationalversion, but if you are using your own you must make sureit supports International charactersets. The default fontused by ADS does not support all charactersets, so if youneed support for Japanese, Chinese and other languagesyou may need to change your font by selecting File-Options-> [Appearance Tab] and select an appropriatefont.

Page 33: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

B. Shortcut Keys

Aqua Data Studio provides short-cut keys for all of the major application tasks.

File Ctrl + N New QueryCtrl + O Open ScriptCtrl + S Save QueryCtrl + Shift + S Save Query AsCtrl + R Save ResultsCtrl + P PrintAlt + F4 Exit

Edit Ctrl + X CutCtrl + C CopyCtrl + V PasteCtrl + Z UndoCtrl + Shift + Z RedoCtrl + A Select AllCtrl + F FindCtrl + H ReplaceCtrl + L To Lower CaseCtrl + U To Upper Case

Server Insert Register ServerDelete Unregister ServerCtrl + Q Query Analyzer

Ctrl + Shift + Q Query AnalyzerClone

Ctrl + Shift + W Query AnalyzerWindow

Query Ctrl + Alt + A ParseCtrl + E ExecuteCtrl + Enter Execute CurrentCtrl + Alt + Enter Execute EditCtrl + Shift + Enter Execute ExplainCtrl + Alt +Backspace Stop

Ctrl + D DescribeF12 SQL Prediction

Page 34: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Ctrl + Shift + A Auto CommitCtrl + Shift + C CommitCtrl + Shift + R RollbackCtrl + Shift + U Auto Complete

Ctrl + Shift + O Auto On AllSchemas

Ctrl + Shift + E Refresh AutoSchema

Ctrl + Shift + H SQL HistoryAlt + F7 Show TextAlt + F8 Show Text HistoryAlt + F9 Show DBMS OutputAlt + F10 Show GridAlt + F11 Execution Plan

Alt + F12 Show ClientStatistics

Automate

Ctrl + Alt + I Introduce InsertStatement

Ctrl + Alt + U Introduce UpdateStatement

Ctrl + Alt + D Introduce DeleteStatement

Ctrl + Alt S Introduce SelectStatement

Ctrl + Alt + C Introduce Columns

Ctrl + Alt + X Introduce QualifiedColumns

Ctrl + Alt + V Introduce Value StubsCtrl + Alt + / Comment StatementCtrl + / Comment LineCtrl + \ Uncomment CommentCtrl + Alt + P Morph to Upper CaseCtrl + Alt + L Morph to Lower Case

Window

Ctrl + F7 Multi-Tab / Split PaneResults

Ctrl + F8 Show / Hide ApplicationToolbar

Ctrl + F10 Show / Hide Query ToolbarCtrl + F11 Show / Hide Query ResultsCtrl + F12 Show / Hide Server Browser

Navigation and Extras

Page 35: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Ctrl + Space Auto-CompleteCtrl + LeftArrow

Shift focus to SchemaBrowser

Ctrl + RightArrow

Shift focus to Querypanel

Ctrl + 1 Switch to next Resulttab

Ctrl + G Goto LineCtrl + Tab Switch to next Query tabCtrl + Shift +Tab

Switch to previous Querytab

Page 36: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

C. Toolbar

Aqua Data Studio's Query Analyzer toolbar provides quick access to the queryediting and execution functions.

New Query - Create a new script fileOpen Script - Open an existing script fileSave Query - Save the current Query Analyzer script to a fileSave Query As - Save the current Query Analyzer script as a newfileSave Results - Save the query results as a file or send them to theClipboardPrint - Print a hard-copy of the selected panelCut - Cut selected text to the ClipboardCopy - Copy selected text to the ClipboardPaste - Paste text from the Clipboard to the current cursor positionUndo - Undo the last actionFind - Find text within the currently selected panelReplace - Replace text within the currently selected panelTo Lower Case - Convert the current word or selected text to lowercaseTo Upper Case - Convert the current word or selected text to uppercaseParse - Parse the script and display a list of the commands as theywill be execute on the serverExecute - Execute every script in the query windowExecute Current - Execute the current statement, defined by thecursor positionExecute Edit - Execute the current single-table SELECT statementand open results in an editable windowExecute Explain - Display visual explain plan for the currentstatementStop - Cancel the currently executing statement or scriptAuto Commit - Determines whether commit is performedautomatically after each statement executionCommit - Commits any active transactions

Page 37: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Rollback - Rollback any active transactionsReconnect - Reconnect the current connectionAuto Complete - Enable/Disable auto-completionAuto On All Schemas - Auto-completion displays tables/views for allschema objects, other than just the current schemaRefresh Auto Schema - Clears the current auto-completion cache

Max Results - Set the max number of rows returnedby a queryDatabase - Change the database you are analyzing

Page 38: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

D. Server Side Comments

Server Side Comments Aqua Data Studio supports client side and server sidecomments. Prior to version 3.5 ADS treated all comments as client side comments.Client side comments are comments which ADS removes from an SQL statementbefore executing (or sending) them on to the server database. Server side commentsare comments which are executed (sent) to the server with the SQL statement. Thereason for server side comments is to support comments stored in stored procedures.When creating stored procedures that include comments, ADS needs to include thecomments in the SQL statement that is executed on the server. ADS supports 3types of comments:

1: Block Comment -> /* Block Comment */2: Line Comment -> -- Line Comment3: Line Comment -> // Line Comment

ADS comments are configurable ... since different databases support differenttypes of comments. In the options dialog box, a user may select each type ofcomment to be a client or server side comment per database. You may view whatstatement & comments will be executed on the server with an "Execute Parse" on astatement/script before executing. Below is a list of databases, what comment typesthey support and the default value for each database.

BBSSC: Block Server Side CommentSSSSC: Slash Slash Server Side CommentDDSSC: Dash Dash Server Side Comment

DB2 - 7.x/8.x DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: FALSE FALSE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE TRUE

Informix 9.3 DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE TRUE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE TRUE

Page 39: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

MS SQL Server 2000 DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE TRUE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE TRUE

MS SQL Server 7 DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE TRUE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE TRUE

MySQL DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE FALSE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE FALSE

Oracle 8i/9i DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE TRUE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE TRUE

Postgresql DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE FALSE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE FALSE

Sybase Anywhere DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE TRUE

SSSSC: { // }: TRUE TRUE

DDSSC: { -- }: TRUE TRUE

Sybase DB SUPPORT ADS DEFAULT

BBSSC { /* */ }: TRUE TRUE

SSSSC: { // }: FALSE FALSE

DDSSC: { -- }: TRUE TRUE

Page 40: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

E. SQL Automation

The idea behind the SQL Automation features in Aqua Data Studio (the "Automate"pull down menu) is to cut down on the amount of keystrokes you make while writingSQL statements.

The most amount of time spent typing away is probably writing templates for basicSELECT, INSERT and UPDATE statments ... including writing out the columns.

So, here is an example of how to automate the writing of basic statements ...

Automate INSERT ...

1. Press CTRL-ALT-I --- this will ...a. Introduce an INSERT template, "INSERT INTO () VALUES()"b. Place the cursor at the "INSERT INTO ^() VALUES()" locationc. Popup a list of tables for autocompletion of the table name you want to INSERTdata into 2. Type out the table you want and move the cursor to the column location,"INSERT INTO MYTABLE(^) VALUES()"3. Press CTRL-ALT-C --- this will ...a. Introduce all of the columns for the TABLE you have typed in a comma separatedlist in the order of definition4. Move cursor to the values definition location "INSERT INTO MYTABLE(COLUMN1,COLUMN2, ...) VALUES(^)"5. Press CTRL-ALT-V --- this will ...a. Introduce stubbed values for the columns of the table according to data type6. At this point you have "INSERT INTO MYTABLE(COLUMN1, COLUMN2, ...) VALUES('', 0, ...)"7. You can now finish your statement

Automate UPDATE ...

1. Press CTRL-ALT-U --- this will ...a. Introduce an UPDATE template, "UPDATE SET WHERE"b. Place the cursor at the "UPDATE ^ SET WHERE" locationc. Popup a list of tables for autocompletion of the table name you want to UPDATE2. Type out the table you want and move the cursor to the column set location,"UPDATE MYTABLE SET ^ WHERE"3. Press CTRL-ALT-C --- this will ...a. Introduce all of the columns and value stubs for the TABLE you have typed in acomma separated list in the order of definition4. At this point you have "UPDATE MYTABLE SET EMPLOYEEID=0, NAME='',SALARY=0, TITLE=0, CREATEDDATE='2002-12-30 23:59:59.0' WHERE"5. You can now finish your statement

Automate SELECT ...

1. Press CTRL-ALT-S --- this will ...a. Introduce a SELECT template, "SELECT * FROM WHERE"b. Place the cursor at the "SELECT * FROM ^ WHERE" locationc. Popup a list of tables for autocompletion of the table name you want to SELECT

Page 41: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

2. Type out the table you want and move the cursor to the column set location,"SELECT ^* FROM MYTABLE WHERE"3. Press CTRL-ALT-C --- this will ...a. Introduce all of the columns for the TABLE you have typed in a comma separatedlist in the order of definition4. At this point you have "SELECT EMPLOYEEID, NAME, SALARY, TITLE,CREATEDDATE FROM MYTABLE WHERE"5. You can now finish your statement

All of the Automation functionality is in the Automate pull down menu.

Page 42: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

F. Variable Binding

Query analyzer scripts now have support for 4 new client side commands whichallow you to execute a stored procedure with local variables binded to theparameters. This allows for the execution of procedures with OUT parameters. Thecommands include print, println, variable and executecallableQuery. Client sidecommands are identified by a dot at the beginning of the command line, and multiplecommands can be executed within one batch statement. The schema browser nowcontains object scripting for procedures and functions that include "EXECUTE" and"EXECUTE BIND". The script EXECUTE will generate the appropriate code needed toexecute the object according to the database procedural language (ie. PL/SQL, T-SQL). The EXECUTE BIND will generate the appropriate Aqua Data Studio client sidecommands to execute the object. To easily generate the needed client commands toexecute a procedure or function, you may browse in the schema browser to locatethe procedure or function and right-click on the object to select "EXECUTE BIND"from the Script Object menus.

• .println [.print]Syntax:.println { <variable_name> | 'text value' }[, ... n]

Example:.println ' Results:', OUTVAR

• .variableSyntax:.variable <variable_name>, datatype [, value]

Example:.variable INVAR, NUMBER, 0.variable OUTVAR, NUMBER, 0.variable INOUTVAR, DATE, '2005-01-01 12:00:00 AM'

• .executeCallableQuerySyntax:.executeCallableQuery 'parameter_name<datatype,{in | out | inout}>[, ... n]',<LINE_BREAK>{ CALL <PROCEDURE_NAME>( ? { , ? ... } ) }or ...{ ? = CALL <PROCEDURE_NAME>( ? { , ? ... } ) }

Example:.executeCallableQuery'INVAR<NUMBER,in>,OUTVAR<NUMBER,out>,INOUTVAR<DATE,inout>',BEGIN SCOTT.FULL_PROCEDURE(?, ?, ?);END;

Page 43: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

G. Results

Query Analyzer provides 5 different query result options.

Text Results -It displays formated text, and the text is cleared for every query.

Text History Results -The Text History is formated text and is appended to theprevious text.

Oracle DBMS_OUTPUT -Oracle allows a user to print out messages from a query,PL/SQL block or stored procedure. ADS will now display this output if it is used by theuser.

Grid Results -Results are displayed in a grid which can be sorted by clicking oncolumn headings. One grid is displayed per statement.

Client Statistics -Displays detailed statistics on the execution of the statement orscript.

Total Processing: This is the amount of time it takes from the second you clickExecute and ADS finishes displaying all of the results on the screen. This is the ScriptExecution time plus the UI time to process the results and display them.

Client Processing: This is the Total Processing time minus the server wait time.

Page 44: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Server wait time: This is the amount of time ADS spends waiting on the server onserver side methods calls to execute and retrieve results. For example, the executingof a SELECT query, ADS might wait 3 seconds for the query to execute on the server(CPU Server Cycles), then another 5 seconds retrieving results (Network TransferCycles). So, this is the best estimate ADS can make on how much time the serverspends executing and sending the data to the client.

Script Parse Time: This is the amount of time it takes to parse the script. This isusually zero, unless you have a really large file.

Script Execution Time: This is the total time it takes from when it starts executingthe script and it ends execution of the script. So, this is the raw execution anddoesn't include any time ADS spends formatting the results to be displayed on thescreen.

Script Details - The Script Detail Results lists each statement executed in a scriptwith detail indicating success, failure and/or warnings. Double-clicking an itemhighlights the associated lines in the script.

Page 45: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

H. Save Results

With Query Analyzer's Save Results feature, the user can save the results of astatement execution to a variety of different file formats or copy them to theclipboard for easy copy & paste.

1. File - Specify the file that will receive the results 2. Encoding - Indicate the character encoding 3. Platform - Select either Windows or Unix platform (to choose the end-of-line

delimiter) 4. Results - Choose the panel containing the content to be saved

• Grid Results - • Text Results - • Client Statistics - • Explain Plan -

5. Data Format - Select the format of the data to be saved • Delimited Data - save the results as a series of delimited rows of data

• Delimiter - character used to delimit columns of data • String quoted identifier - character used to delimit strings • Include columns as first row - Include column names as the first

row of the document • Include row count as first column - include row number in the

first column of each row • Set text to (null) on NULL value - use the string "(null)" to

represent a NULL value in the document • INSERT Statements - save the results as a series of INSERT SQL

statements • Schema Name - specify the name of the schema containing the

table • Table Name - specify the table name • Statement Separator - select a statement separator • Include table CREATE as first statement - include a CREATE SQL

statement as the first statement of the document • XML Document - save the results as an XML document

• String quoted identifier - character used to delimit strings • Include columns as first row - include column names as the first

row of the document • Include row count as first column - include row number in the

first column of each row • Set text to (null) on NULL value - use the string "(null)" to

represent a NULL value in the document • HTML Document - save the results as a formatted HTML document

• Include SQL Statement - include the SQL statement in thedocument

• String quoted identifier - character used to delimit strings • Include columns as first row - include column names as the first

row of the document • Include row count as first column - include row number in the

first column of each row • Set text to (null) on NULL value - use the string "(null)" to

represent a NULL value in the document

Page 46: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

• Excel Worksheet - save the results as a Microsoft Excel spreadsheetNote: this format cannot be sent to the Clipboard

• Include SQL Statement - include the SQL statement in thedocument

• Include columns as first row - include column names as the firstrow of the document

• Include row count as first column - include row number in thefirst column of each row

• Set text to (null) on NULL value - use the string "(null)" torepresent a NULL value in the document

6. Click Save to Clipboard to send the results to the clipboard in the specifieddata format.

7. Click Save to File to send the results to a file in the specified data format.

Page 47: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

VII. Procedure Editor

Aqua Data Studio's PL/SQL and Procedure editor offers the user a compilationand execution environment for the development of stored procedures, functions andpackages.

• Compile - Compiles the procedure, logging any compilation messages in theresult grid below.

• To jump to the source of a compilation error, double-click on the line inthe Compilation Messages grid

• Execute Procedure - Displays the Execute Procedure dialog to let the userspecify parameters before execution.

• To set a value, simply click on the parameter's Value cell and enter avalue.

• To execute, click the Execute button or click the Cancel button to abortexecution

Page 48: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

VIII. Visual Explain

A. Basics

Aqua Data Studio's Visual Explain provides a user a visual display of an executionplan for a query. ADS provides a "Show Execution Plan" option in the main toolbar. Ifthis option is enabled an execution plan will be generated for each query executed inthe results tab. Multi-execution plans are supported, thus executing a script willgenerate multiple execution plans. ADS also provides an "Execute Explain" button inthe query window which will generate an execution plan for the current query or thehighlighted queries without executing the query. The visual explain plans have anidentical layout for all databases except for the row information for each nodeoperation, of which contains specific column information according to the specificdatabase server.

Before you begin using visual explain you may want to review the default settingsaccording to your database. You may change the settings in the File->Options->[Explain] tab. Microsoft SQL Server does not have any configurable settings andworks from installation by only enabling the execution plan. For Oracle, the defaultsettings should also work from installation. ADS will create and drop an explain tableevery time the user executes a query or executes explain with a dynamic explaintable name using the session id, so the explain tables are not confused bysimiltaneous users. If you would like to manually configure and create an explaintable for all of your users, you may do so and have all ADS users configure their ADSinstallation to access that specific table. DB2 should also work out of the box, whichby default will create the explain tables if they do not exist but will not drop them.The reason for the different configurations for the 3 different databases is because ofthe different implementations by the database vendor. Microsoft SQL Server's explainplans can be easily enabled by issuing an SQL statement which will return explainplan resultsets. Oracle allows a user to execute an EXPLAIN statement whichprovides an option to place the explain data in an explain table of the user's choice.DB2 also provides an EXPLAIN statement which will only insert data into a definedexplain plan table. The issues arise in supporting explain plans for concurrent users.The ADS Oracle and DB2 explain implementations will create explain data in theexplain tables identified by a Globally Unique Identifier (GUID) and a statement id toensure concurrency.

Currently, ADS supports execution plans for Oracle, DB2 and Microsoft SQL Server.The codebase is in place to support execution plans for any database which supportsexplain plans through the retreival of a resultset. Oracle and DB2 support explainplans through explain tables, and Microsoft SQL Server supports them throughreturned resultsets. If other databases include this type of support, ADS can easilybe made to support visual explains for that database.

There are 2 ways that ADS can be used in comparing execution plans of queries.The first option is to "Execute Explain" on 2 highlighted queries at the same time,which will give you 2 visual explains in the results to compare. The second option isto open 2 popup Query Windows and execute a single query in each window to becompared side-by-side.

Page 49: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

B. Explain Plan

The Visual Explain Plan offers insight into the execution of SQL Statements andhelps the user isolate potential performance bottlenecks. Each operation (Join, Sort,Index Scan, etc) is displayed with statistics describing the resources required toperform the task.

The Explain Plan grid has several pop-up menu options to view the results indifferent ways and highlight areas of interest:

• To view a diagram of the Explain Plan, select Explain Diagram • To save the grid's column widths, select Save Column Positions • To add this Explain Plan to the Explain Whiteboard for comparison, select

Add to Whiteboard • To highlight the critical path, select Color Critical Path • To highlight the critical node, select Color Critical Node • To highlight the critical operation, select Color Critical Operation

The Explain Plan grid provides the following vendor-specific information regardingeach operation:

Oracle

• Operation - operation name • Node Cost - total estimated cost of the operation • IO Cost - estimated I/O cost of the operation • CPU Cost - estimated CPU cost of the operation • Cardinality - estimated number of rows accessed by the operation • Bytes - estimated number of bytes accessed by the operation • Position - for 1st row of output: the optimizer's estimated cost of the

statement; for other rows: the position relative to other children of the sameparent

• Obj Owner - name of the user who owns the schema containing the table orindex

• Obj Name - name of the table or index • Options - an operation descriptor • Obj Type - descriptive information about the type of object • Optimizer - current mode of the optimizer • Obj Instance - ordinal position of the object as it appears in the original SQL

statement • Remarks - A comment (up to 80 bytes) associated with each step of the

explain plan • Obj Node - Name of the database link used to reference the object • Search Columns - Not currently supported • Other Tag - Describes the contents of the Other column • Partition Start - the first partition in the range of partitions accessed • Partition Stop - the last partition in the range of partitions accessed • Partition Id - step that determines first & last partitions

Page 50: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

• Other - Miscellaneous information regarding this operation • Distribution - the method used to distribute rows from producer to consumer

servers • Temp Space - estimated temporary space, in bytes, used by the operation

SQL Server

• Operation - operation name • Subtree Cost - cost of this node in addition to the costs of any child nodes • Node Cost - total estimated cost of the operation • Est. IO - estimated IO cost • Est. CPU - estimated CPU cost • Est. Rows - estimated number of rows accessed by the operation • Rows - number of rows produced by the operation • Executes - number of executions of this operation • Argument - arguments sent to this operation • Type - Type of node • Average Row Size - average row size (in bytes) • Defined Values - values defined by this operation • Output List - output values of this operation • Warnings - warning messages for this operation • Parallel - 0 / 1 indicating if this operation is running in parallel • Est. Executions - estimated number of executions of this operation • Physical Operation - Physical / Implementation operation name • Logical Operation - Logical / Algebraic operation name • Statement Text - complete operation name with arguments

DB2

• Operation - operation name • Subtree Cost - cost of this node in addition to the costs of any child nodes • Node Cost - total estimated cost of the operation • IO Cost - estimated cumulative I/O cost of executing the operation • CPU Cost - estimated cumulative CPU cost of executing the operation • Obj Schema - name of the schema containing the object • Obj Name - object name • First Row Cost - estimated cumulative cost of fetching the first row for this

operation • RE Total Cost - estimated cumulative cost of fetching the next row for this

operation • RE IO Cost - estimated cumulative I/O cost of fetching the next row for this

operation • RE CPU Cost - estimated cumulative CPU cost of fetching the next row for this

operation • Commun. Cost - estimated cumulative communication cost of executing this

operation • First Commun. Cost - estimated cumulative communication cost of fetching

the first row for this operation • Remote Commun. Cost - estimated cumulative remote communication cost for

this operation • Remote Total Cost - estimated cumulative total cost of executing this

Page 51: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

operation on remote databases • Stream Count - estimated cardinality of data stream • Buffers - estimated buffer requirements for this operation and its inputs • Column Count - number of columns in data stream • Explain Requester - authorization id of initiator of this Explain request • Explain Time - time of initiation of Explain request • Source Name - name of the package running or source file when the

statement was explained • Source Schema - Schema, or qualifier, of source of the explain request • Explain Level - level of explain information for this row • Section Number - section number within package • Stream ID - unique id for this data stream • Source Type - indicates the source of this data stream

• O - Operator • D - Data Object

• Target Type - indicates the target of this data stream • O - Operator • D - Data Object

• Column Names - names and order of the columns in this stream • PMID - partitioning map id • Single Node - indicates if this data stream is on a single or multiple partitions

• MULT - on multiple partitions • COOR - on coordinator node • HASH - directed using hash • RID - directed using row id • FUNC - directed using a function: HASHEDVALUE() or

DBPARTITIONNUM() • CORR - directed using a correlation value • numeric - directed to the predetermined single node

• Partition Columns - list of columns on which this data stream is partitioned • Operator Type - descriptive label of the type of operation

Page 52: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

C. Explain Diagram

The Visual Explain Diagram offers a graphical illustration of anexplain plan's results. The operations are rendered as a tree ofnodes, with the most significant elements colored according tothe percentage cost relative to the entire statement.

Use this tool to quickly identify areas of your SQL statementswhich may require tuning.

• To save the diagram as an image (JPG or PNG), click SaveImage As

• To print a hard-copy of the diagram, click Print • To highlight the critical path, click Color Critical Path • To highlight the critical node, click Color Critical Node • To highlight the critical operation, click Color Critical

Operation

Page 53: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

D. Explain Whiteboard

The Visual Explain Whiteboard acts as a workspace for the easy comparison ofmultiple explain plans. When performance tuning SQL statements, it is often usefulto execute a plan on a statement, locate performance bottlenecks, modify thestatement and then execute a second plan.

The Whiteboard allows you to compare these plans side-by-side to determine if theperformance tuning has positive or negative effects.

• To clear the Whiteboard, click Clear Changes

Page 54: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

IX. Browser & Scripting

Schema Browser - The schema browser capabilities allows you to browse throughyour server connections and view the database structure of all the database andschema objects to understand the structure and dependencies of the objects.

Schema extraction and DDL & DML Scripting - The schema browser allows youto extract schema definitions of database objects and script the SQL DDL and DMLstatements to a query window. With a right-click of the mouse you may script aSELECT, INSERT, UPDATE or DELETE on any table or view. You may also scriptCREATE, ALTER and DELETE SQL statements for stored procedures and functions tomanipulate the objects.

Script Browser - The script browser allows you to mount different directories sothat you may browse and open your database scripts with a mouse click. Withmounted directories the browser gives you quick access to open scripts into yourquery window.

Page 55: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is
Page 56: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

X. Visual Editing

Visual Editing - Aqua Data Studio provides visual editors for database schemaobjects, database storage objects and security objects. By navigating the schemabrowser a user may locate any object and by right-clicking the mouse get a popupmenu with the CREATE, ATLER and DROP commands for the object. By selecting thedesired operation the user may visually CREATE, ALTER or DROP the object. Once theobject has been designed in the form, the user may click the "Ok" button at whichtime the form will generate an SQL statement(s) which are executed on the databaseto create the object and refreshes the schema browser to show the new object.Syntax Coloring of Changes - When ALTERing an object, the visual forms don'tmake any changes to the database until the user clicks the "Ok" button. Instead, theforms will keep track of the changes the user is making until the user decides tocommit the changes. To help the user remember what changes he/she has made, theform colors the changes so the user knows what attributes have been changed,added or dropped. All dropped attributes are colored red. Changed attributes areblue, and added attributes are green. SQL Preview - At any point while CREATEingor ALTERing an object, the user may click on the SQL Preview tab to view the SQLstatements that the visual form will use to make the changes in the database.

Visual Editing for Schema forms allows a user to visually CREATE, ALTER andDROP schema objects with easy to use forms. The schema objects supported for alldatabases include Tables, Views, Indexes, Triggers, Stored Procedures, Functions,Packages, Package Bodies, Sequences, Synonyms/Aliases, Defaults, Rules and DataTypes.

Visual Editing for Storage capabilities allow you to CREATE, ALTER, RESIZE andDROP storage devices for a given database. The schema browser also allows youto navigate the storage structure and to visually alter any of the components of thestorage objects and then commit the changes.

Storage objects supported include:

• DB2 8.1: Tablespaces, Containers • Oracle: Tablespaces, Datafiles, RedoLogs, Rollback Segments, Controlfiles, Archive

Logs • MSSQL Server: Databases, Backups • Sybase: Caches, Dump Devices, Database Devices, Databases • Informix: Databases • MySQL: Databases • PostgreSQL: Databases

Visual Editing for Security allows a user to visually CREATE, ALTER and DROPsecurity objects with easy to use forms. The security objects supported for alldatabases include Users, Roles, Profiles, Logins, Server Roles andObject/Column Permission.

Below is a list of databases and the security objects supported:

• DB2: Users, Roles, Object Permissions, Column Permissions

Page 57: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

• Informix: Users, Roles, Object Permissions, Column Permissions • MySQL: Users, Object Permissions, Column Permissions • Oracle: Users, Roles, Profiles, Object Permissions, Column Permissions • Sybase Anywhere: Users, Roles, Object Permissions, Column Permissions • Sybase: Logins, Server Roles, Users, Roles, Object Permissions, Column

Permissions • MS SQL Server: Logins, Server Roles, Users, Roles, Object Permissions, Column

Permissions • Postgresql 7.4/8.0: Users, Roles, Object Permissions • Postgresql 7.2/7.3: Not Supported

Page 58: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

XI. Table Editor

Table Editor - Aqua Data Studio provides a Table Editorwhich allows a user to graphically edit a resultset of aexecuted query. To activate a table editor you must write asingle-table SELECT statement and use the "Execute Edit"button. This will execute the query and return the resultsetin a new Table Editor window. From this window a user mayedit the contents of the resultset and then save the changes.

The editor uses the primary key or any unique constraint toidentify the row in the result it will generate UPDATEstatements for. If your resultset doesn't have a primary keyor unique constraint, you will be prompted to define aprimary key in the primary key tab.

The editor allows you to add, edit and delete rows. Thechanges in the editor or color coded so that you may seeyour changes before commiting the changes. Before savingyou may clear any part of your changes. You may alsopreview the changes that will be made in the 'Preview SQL'tab window, or save the SQL statements for the changes to afile.

Page 59: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

XII. SQL History

SQL History - Aqua Data Studio includes an SQL History feature which provides ahistory of all SQL statements and scripts that have been executed. The SQL Historydialog can be activated by clicking on the SQL History toolbar button. The historywindow does not need to be closed to continue working on your queries, and mayrun side-by-side with the main window.

The SQL History window provides a list of previously executed statements and theability to select any statement into the current Query Window. The 'Max History' setsthe maximum number of sql commands stored in the history. The 'Max StatmentsPer Entry' sets the maximum number of statments stored in a history entry. If the'Max Statements Per Entry' is set to 5 and a script of 100 statements are executedonly the first five would be stored with that entry.

The 'Date' column show the time the query was executed. The 'Server Type' indicateson what type of database server the query was executed on. The '# Stmts' showshow many statements are stored in that entry.

Page 60: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

XIII. Import & Export Tool

Import Tool

1. Select Tools->Import Data from the Menubar. This will prompt you to choose aserver in which to import data into. Navigate and select your server and click ok. Thiswill bring up the Import dialog

2. The first tab in the wizard is the General Tab. First, browse and select the file youwant to import. Once the file is selected a sample of the file will be displayed in thebottom grid. Then select the encoding and platform your file is formatted in. Thesample columns will be refreshed as you make changes to your options. Selectwhether your file is delimited or has fixed width columns. If your file has fixed widthcolumns, type the widths of your columns separated by commas (eg: 15,25,35,60 ).While typing the column widths the sample data will not change, so make sure toclick on the Fixed Width radio box to refresh. You may select whether the first row inthe file contains the column names to help the import tool map to the table. Last,select the quote identifier for your data values. Make sure the sample data beingdisplayed is formatted correctly before proceeding, then click next.

3. The the Format Tab, you may now select the database, schema and table in whichyou want to import the data into. If you would like to import into a new table, youmay click on the "..." button which will open a Create Table dialog with the columnsdefined in the sample file. You may change the names and datatypes of the columnsin the table and then click ok. At this point you may import into the newly createdtable. If the sample file contains the column names of the values, ADS will make anattempt at matching the column names of the import file to the names of thecolumns of the table. You may reorder the column mapping by changing the Positioncolumn value to match the column number in the sample file, or you may removethe position value to exclude the column from being imported. Once all columns aremapped click next.

4. In the Options Tab you may begin by selecting whether you want "(null)" textvalues to be converted to NULL values. Then you must select the format of the dates& time, date and time values will be formatted in the text file to be imported intodate/time columns. If a date string is to be imported into a VARCHAR column thenthe format does not apply. You also have the option to import directly into thedatabase, or generate an SQL file with INSERT statements to import into thedatabase. A sample of the files values are provided below for configuring thedate/time formats. When ready, you may click the Next button to import the data.

5. Once in the Status Tab the import has begun. You may cancel the import at anytime by clicking on the cancel button at the bottom of the dialog. If any errors orwarnings occur, they will be displayed in the message text window.

Export Tool

1. Select Tools->Export Data from the Menubar. This will prompt you to choose aserver in which to import data into. Navigate and select your server and click ok. Thiswill bring up the Import dialog

Page 61: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

2. The first tab in the wizard is the General Tab. In this section you must specify thesource of the data to be exported. The first option is to specify a table to export,which will export the contents of the table. The other choice is to specify a SELECTstatement of which the results will be exported. If you specify a SELECT statement,then you must also select a database in the database combo box in which thestatement will be executed.

3. In the Options Tab you may first begin by browsing and selecting a file location tosave the exported data. Then specify the encoding and platform to save the file in.You may specify one of two different formats. You may specify the format asdelimited data, and then specify the delimiter, quote identifier, NULL value andwhether to include the column names as the first row of the export. Or you mayspecify the format as INSERT statements which later may be executed in the QueryAnalyzer.

4. Once in the Status Tab the export has begun. You may cancel the export at anytime by clicking on the cancel button at the bottom of the dialog. If any errors orwarnings occur, they will be displayed in the message text window.

Date and time formats are specified by date and time pattern strings. Within dateand time pattern strings, unquoted letters from 'A' to 'Z' and from 'a' to 'z' areinterpreted as pattern letters representing the components of a date or time string.Text can be quoted using single quotes (') to avoid interpretation. "''" represents asingle quote. All other characters are not interpreted; they're simply copied into theoutput string during formatting or matched against the input string during parsing.

Letter Date or TimeComponent Presentation Examples

G Era designator Text AD y Year Year 1996; 96 M Month in year Month July; Jul; 07 w Week in year Number 27 W Week in month Number 2 D Day in year Number 189 d Day in month Number 10

F Day of week inmonth Number 2

E Day in week Text Tuesday; Tue a Am/pm marker Text PM H Hour in day (0-23) Number 0 k Hour in day (1-24) Number 24

K Hour in am/pm (0-11) Number 0

h Hour in am/pm (1-12) Number 12

m Minute in hour Number 30 s Second in minute Number 55 S Millisecond Number 978

z Time zone General timezone Pacific Standard Time; PST; GMT-08:00

Z Time zone RFC 822 timezone -0800

The following examples show how date and time patterns are interpreted in the U.S.locale. The given date and time are 2001-07-04 12:08:56 local time in the U.S.

Page 62: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Pacific Time time zone. Date and Time Pattern Result "yyyy.MM.dd G 'at' HH:mm:ss z" 2001.07.04 AD at 12:08:56 PDT "EEE, MMM d, ''yy" Wed, Jul 4, '01 "h:mm a" 12:08 PM "hh 'o''clock' a, zzzz" 12 o'clock PM, Pacific Daylight Time "K:mm a, z" 0:08 PM, PDT "yyyyy.MMMMM.dd GGG hh:mm aaa" 02001.July.04 AD 12:08 PM "EEE, d MMM yyyy HH:mm:ss Z" Wed, 4 Jul 2001 12:08:56 -0700 "yyMMddHHmmssZ" 010704120856-0700

Page 63: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is
Page 64: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

XIV. ER Diagram Generator

The Entity Relationship (ER) Diagram Generator helps users achieve a betterunderstanding of their database schema by displaying the structure in a graphicalformat. To view an ER Diagram:

1. Launch the ER Diagram Generator dialog by: • Selecting Tools -> ER Diagram Generator from the Menu Bar OR • Selecting Tools -> ER Diagram Generator from the right-click pop-up

menu on a database object in the Schema Browser 2. Select a Database and Schema (or All Schemas) 3. In the left panel, select one or more types of objects to be scripted (Tables,

Views or Both).Click the green check button to select all and the red X button to deselect all.

4. All objects matching the selected schema & object types will appear in theright panel. Select one or more objects to be scripted.Click the green check button to select all and the red X button to deselect all.

5. Click Next to generate the diagram 6. Once the diagram is generated, the ER Diagram Viewer will open and

display the new diagram. 7. To change the layout of the diagram, select an entry from the Layout

dropdown list.Supported layouts include:

• Box • Circle • Hierarchical • Tree • Radial Tree • Moen • Fruchterman-Reingold (FR) • Annealing • Inverted Self Organising Map (ISOM)

8. The Entity View drop-down list determines the amount of detail displayed foreach entity in the diagram. Select Full to view all attributes or Header toview only the entity name.

9. To save an image of the current diagram, click Save Image As. 10.To print a hard-copy of the current diagram, click Print. 11.Click on an entity to display more column & constraint detail in the lower left

panel.

Page 65: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is
Page 66: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

XV. Script Generator

Aqua Data Studio's Script Generator allows the user to generate SQL Scripts forobjects in a database. To generate scripts:

1. Launch the Script Generator dialog by: • Selecting Tools -> Script Generator from the Menu Bar OR • Selecting Tools -> Script Generator from the right-click pop-up menu

on a database object in the Schema Browser 2. Select a Database and Schema (or All Schemas) 3. In the left panel, select one or more types of objects to be scripted.

Click the green check button to select all and the red X button to deselect all. 4. All objects matching the selected schema & object types will appear in the

right panel. Select one or more objects to be scripted.Click the green check button to select all and the red X button to deselect all.

5. Click Next to proceed to the Options tab 6. Specify where to save the generated scripts

• Save as • One File - All SQL Statements will be output to a single file. • One File Per Object - SQL Statements will be output to one file

per object. • Preview Tab - All SQL Statements will be output to the Preview

tab (for copy & paste) • Directory / File Name - If saving as one file, select the file to receive

the output. If saving as one file per object, select the directory tocontain the files.

• Encoding - Allows user to select a character encoding for files • Platform - Select a platform (Windows or Unix)

7. Select any appropriate options • Statement Separator - GO, /, ; or enter your own separator. • Object Quoted Identifier - none, [], "" or '' • Generate the CREATE - generate CREATE statements for the selected

objects. • Generate the DROP - generate DROP statements for the selected

objects. • Include Descriptive Header - include a header at the top of the file

indicating the date, time, database, schema and names of objectscontained in the file.

• Sort By Dependencies - Output the objects in order to avoiddependency conflicts.e.g. if object A depends on object B, object B should be output beforeobject A

• Enable Identity Insert - SQL Server / Sybase only - If a tablecontains identity columns, place delimiting keywords to allow INSERTof data into these columns.

• Tables: Script full table (Indexes, Triggers) - Output indexes andtriggers for tables.

• Include INSERT statements for data of Tables - Output data ofTable objects as INSERT statements.

Page 67: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

• Qualify Objects - Fully qualify names of objects by including theSchema name.

• Include blank line between statements - Include blank lines toimprove format of output.

8. Click Next to generate the scripts for the selected objects. The output processcan be halted at any point by clicking Cancel.

9. Click Close to close the dialog or click Previous to change selections and re-generate the scripts.

Page 68: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

XVI. Options

Application Options - Aqua Data Studio has different configurable options, whichmay be accessed through the Menu:File->Options command. The option dialogcontiains 6 tabs: General, Editor, Results, Query Analyzer, Scripts and ResultsFromat Options.

Note: All application options are stored in a file called datastudio.properties in theuser home directory. This file may be modified manually are deleted to set allsettings back to default.

General - The General options include Scripts, Password, Scripting and History. TheScripts Filter options allows you to filter the files displayed in the script browser.

• Appearance:

Look and Feel:Look and Feel used by the application. Look and Feel Font:The font used by the application for the user interfacecomponents. SQL Editor Font:The font used by the SQL Editor in the Query Analyzer. Text Results Font:The font used by the Text Results panel in the QueryAnalyzer. Grid Results Font:The font used by the Grid Results in the Query Analyzer.

• General:

Script Filters:File extensions which identify scripts to be displayed in theschema browser, script browser and file dialogs. Display Server Type:Display server type [Production/Development/Test] onserver node. ';' Statement separator:In SQL Scripts, interpret ';' at end of line as statementseparator. NOTE: Enabling this feature may cause issues with PL/SQL, Transact-SQL and Procedure DDL statements.

Page 69: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Save Passwords:Save passwords when registering a server. Maximum # of lines in Text History:Maximum # of lines in the Text Historyresults. Maximum # of Message Lines:Maximum # of lines in the Messages results.

• Query Windows:

Do not prompt to save for new scripts:Determines whether the application willprompt the user to save a modified query window when closing the window. MultiTab Query Window:Determines whether the Query Window arranges theeditor and results in a split pane or multitab pane.

• Scripting:

Indentation:Number of space identations when generating DDL scripts. Statement Separator:Statement separator to use when generating DDLscripts.

Editor - The Editor section allows you to configure settings in the SQL Editor forauto-completion, syntax coloring and tab conversion options.

• Auto Completion: Supports customization of auto completion behavior in theeditor ...

Auto Popup: Code completion window automatically appears whenappropriate. Auto Popup Delay: How long to wait (in milliseconds) before automaticallypopping up the completion window. Instant Substitution: Code completion performs instant substitution, if thesearch result contains only one item. Maximumn Pane Size: The maximum size of the completion pane window. Minimum Pane Size: The minimum size of the completion pane window.

• Syntax Coloring: Provides the ability to enable/disable and set the syntax colorfor keywords ...

Enable Auto-Completion: Determines whether Syntax Coloring is enabled. SQL 92/99 Keywords: The color used for standard SQL 92 and 99 keywords. Vendor Keywords: The color used for vendor specific keywords. Data Types: The color used for database specific data types. System Functions: The color used for database specific system functions. System Tables: The color used for database system tables. Quoted Strings: The color used for single quoted strings. Comments: The color used for commented text. Aqua Commands: The color used for aqua commands.

• Tabs: Provides the ability to set the behavior of the Tab/Space conversion in theeditor ...

Page 70: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Expand Tabs to spaces: Determines whether a TAB is expanded to spaces orwhether a real TAB is used. Number of Spaces in Tab expand: Number of spaces to expand in a TAB ifExpand Tab is enabled. Size of Tabs: The display size in characters of a TAB.

Results - In the Results section you may choose different options on the results inthe Query Analyzer, including how the data is retieved and how it is displayed.There are also configuration options for Visual Explain.

• Script Execution:

Stop On Error: Stop executing statements after a failed query.

• Data Retrieval:

Convert binary to hex: Convert binary results to hex. Maximum BLOB Blocks: Maximum number of 8k blocks to retrieve from BLOBvalues. Maximum CLOB Lines: Maximum number of lines to retrieve from CLOBvalues.

• Text Results:

Maximum column length: Maximum length of characters to display percolumn. Display SQL Statement: Determines whether the SQL statements aredisplayed for each query. Display query statistics: Determines whether the statistics are displayed foreach query. (ALT-SHIFT-R). Display warning headers: Determines whether the warning headers aredisplayed along with the warning messages. Always display 'records effected' count: Will display "records effected" even ifDisplay Query Stats are off.

• Message Results:

Clear message results before execute: Determines whether to clear themessage results tab before executing a statement or script.

• Grid Results:

Alternate row colors: Determines whether the colors of every other row uses acustomized colore scheme. Alternate row foreground: Determines the foreground of the alternate row. Alternate row background: Determines the background of the alternate row.

Page 71: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

• Syntax Coloring:

Enabled: Determines whether Syntax Coloring is enabled. SQL Statements: The color used for SQL Statements. SQL Errors: The color used for SQL error messages.

Query Analyzer - Allows you to set the default values for the Query Analyzer.Any new query window opened will have the default values for 'Auto-Completion', 'Auto-Commit', 'Max Results' and 'Auto On All Schemas'.

Scripts - Allows you to define how comments are handled within scripts. You maydefine what types of comments are Server Side Comments for each database. Youmay also define the quoted identifier and whether to qualify an object with theschema when scripting objects to a query window.

Results Format - Allows you to define how datatypes are formatted in the Textand Grid results.

Visual Explain - Allows you to configure different options for visual explain plansand diagrams.

Oracle Visual Explain:

Page 72: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Create explain table:Create explain table if it does not exist prior to executingquery. Drop explain table:Drop explain table after executing query. Use dynamic explain table:Determines whether to use a dynamic explain tablename (AQUA_EXPLAIN_[SESSIONID]) or a user defined table. Explain schema:The schema name of the explain table to use if a user definedexplain table is selected. Explain table:The table name of the explain table to use if a user definedexplain table is selected.

• DB2 Visual Explain:

Create explain tables:Create explain tables if they do not exist beforeexecuting query. Drop explain tables:Drop explain tables after executing query.

• Oracle:

Create explain table:Create explain table if it does not exist prior to executingquery Drop explain table:Drop explain table after executing query Use dynamic explain table:Determines whether to use a dynamic explain tablename (AQUA_EXPLAIN_[SESSIONID]) or a user defined table Explain schema:The schema name of the explain table to use if a user definedexplain table is selected Explain table:The table name of the explain table to use if a user definedexplain table is selected Display commit warning:Display commit warning when auto-commit isdisabled and CREATE/DROP is enabled Color critical nodes:Determines on whether to color code the highest costnodes in an explain plan Color critical operations:Determines on whether to color code the highest costoperations in an explain plan (i.e. 'Full Table Scan' and 'Cartesian Join')

• DB2:

Create explain tables:Create explain tables if they do not exist beforeexecuting query Drop explain tables:Drop explain tables after executing query Color critical path:Determines on whether to color code the path to thehighest code path in an explain plan Color critical nodes:Determines on whether to color code the highest costnodes in an explain plan Color critical operations:Determines on whether to color code the highest costoperations in an explain plan (i.e. 'Full Table Scan' and 'Cartesian Join')

• SQL Server:

Color critical path:Color critical path Color critical nodes:Determines on whether to color code the highest costnodes in an explain plan Color critical operations:Determines on whether to color code the highest costoperations in an explain plan (i.e. 'Full Table Scan' and 'Cartesian Join')

• Critical Path:

Page 73: Aqua Data Studio 4.5 Documentation Table of Contentsmideiros.net/doc/adstudio/adstudio_manual.pdf · with ADS work across all versions of Sybase Anywhere from 7.0 to 9.0. There is

Background:Background color of the nodes in the critical path Foreground:Foreground color of the nodes in the critical path

• Critical Node:

Background of 1st critical node:Background color of the highest cost node Foreground of 1st critical node:Foreground color of the highest cost node Background of 2nd critical node:Background color of the 2nd highest costnode Foreground of 2nd critical node:Foreground color of the 2nd highest cost node Background of 3rd critical node:Background color of the 3rd highest cost node Foreground of 3rd critical node:Foreground color of the 3rd highest cost node

• Critical Operation:

Background of 1st critical operation:Background color of 1st level criticaloperation Foreground of 1st critical operation:Foreground color of 1st level criticaloperation Background of 2nd critical operation:Background color of 2nd level criticaloperation Foreground of 2nd critical operation:Foreground color of 2nd level criticaloperation Background of 3rd critical operation:Background color of 3rd level criticaloperation Foreground of 3rd critical operation:Foreground color of 3rd level criticaloperation