Sybase SQL Studio 6.0.3 Programmer's Guide

Source: Internet
Author: User
Tags command line documentation resource sybase sybase database sql studio linux

Objective

This article introduces the features, strengths, weaknesses, installation, and management skills of Sybase's SQL Anywhere Studio (SAS) 6.0.3 for Linux from a database programmer's perspective, and gives a fine example. If you use the C language programmer, you can benefit from the SQLC introductory textbook introduced in this article.

Sybase is one of the oldest known products in SQL database management systems. In fact, Microsoft's SQL Server was originally a Sybase product ported to the Dos/windows platform. Since the breakup of the two companies, Sybase has been specializing in UNIX systems, and Sybase continues to specialize in 1997 and 1998 on UNIX when databases and other businesses should assume that UNIX is about to end and NT is gaining market position. As a result, it did not change its nature and ported its flagship product ASE (Adaptive Server Enterprise) from its enterprise server to Linux in the 1998 industry's frenzy of porting to Linux, too much redhat, Caldera and SuSE bundle of evaluation packages and can prove Sybase's support for the Linux community.

Sybase recently released SQL Anywhere Studio 6.0.3, an integrated suite of bundles of ASE and its tools. The 6.0.3 version ultimately increases compatibility with Redhat 6.0. RedHat 5.x and 6.x are now the only supported platforms, but Sybase says support for official releases such as Caldera, OpenLinux and SuSE is underway.

Abbreviated Vocabulary List

sql:structured query Language/structured queries language
Dbms:database Management System/Database management systems
Ase:adaptive Server enterprise/sybase Database Products
Sas:sql Anywhere server/sybase Database integration Tools
Ram:random Access Memory/random access memory
Bash:bourne Again Shell/: A shell of a Linux system
Isql:interactive SQL/Interactive Structured Query Language
Ui:user Interface/user interface
Gnome:gnu Object Modeling ENVIRONMENT/GNU Objects Modeling Environment
Jdk:java Development Kit/java Development Kit
Jvm:java Virtual Machine/java Machine
Jdbc:java DB Connectivity/java Database connection
Url:universal Resource Locator/: Generic resource Locator
Html:hypertext Markup Language/Hypertext Annotation Language
Sqlc:sql in C/sql in C
Psm:procedural Stored model/stored procedure models
SQL for Sqlj:sql in Java/java language
Blob:binary Large Objects/Large binary objects
Clobs:character Large Objects/Large Character object
Xml:extensible Markup Language/Extensible Callout Language
Jar:java Archive/java Archive File
Stdout:standard output/Standard export equipment
Stderr:standard error/Standard error device
Api:application Programming Interface/Application Programming interface
Gtk:gimp Toolkit/gimp Toolbox
Kde:k Desktop environment/k Desktop Environment
Dba:database Administrator/Database Manager
Odbc:open DB Connectivity/Open database connection
Tcl:tool command Language/tool commands language
Sqsh:sql Shell/Structured Query Language shell
php:php Hypertext processor/php Hypertext processor
Tds:tabular data stream/tabular streaming installation and setup

I installed the SAS 6.0.3 Test networking Workgroup feature on both machines. I first installed the SQL Server on a machine running Redhat 6.0 in Pentium 400, a 96MB RAM. There is an installation script on the CD that launches a full Screen character menu installer (see Figure 1). I run the script with the root user. First, I was asked to select a part to install (I chose Adaptive Server Enterprise 6.0.3), and then I chose to have the package selected within the widget (I chose the Web server, which contains a SQL remote personal server , and indicated that I want Java support). It gives you a hint that you are installing the file, and then asks me the name, company, and type of license.

Figure 1 SQL Server Setup then something weird happened, setup script started installing Sybase (Java Control Panel), but then the error directory $sybase does not exist, before installing, I have specified/opt/sybase-ase6 as the installation directory, So I expect the script to set the $SYBASE environment variable accordingly, but it suggests/opt/sybase as the default directory, unlike the original recommended default directory/OPT/SYBSASE6.

As a result, I am not sure whether the installation really requires Sybase to be in another different location. I continue and reassign/opt/sybase-asa6. Everything looks normal, but this mess Sybase should be able to easily avoid and correct.

Next we return to the Component menu, where I choose to end the installation, then define $sybase in my personal user account and add $sybase/bin to the path,/$SYBASE/lib to Ld_library_path. For bash users, the command is:

$ Export SYBASE=/OPT/SYBASE-ASA6

$ export path= $PATH: $SYBASE/bin

$ export ld_library_path= $LD _library_path: $SYBASE/lib

Then I browsed the readme.1st file in the Quick-start/tutorial directory and started a database example with the following command:

$ Dbeng6 asademo.db

Do not run the server with the background process after the command line &, instead, use the option "-gu" to run as a daemon.

installation of Interactive SQL

Then I open the full screen character mode query interface, run the Dbisql command in another window to start interactive SQL (ISQL), ISQL look for running local server, if it finds, auto join, of course first ask your username and password of course. From isql, I perform a simple query:

SELECT * FROM Employee

The results of the query are shown in Figure 2.

SQL Keyboard Command table

F1:help/Help
F5:scroll data Display left/leftwards scrolling
F6:scroll data Display right/rightwards scrolling
F9:execute The SQL query you have entered/execute your input SQL queries
F10:activate the menus/activate menu
Ctrl+pgup:move to top of data display/move to the front of the show
Ctrl+pgdn:move to bottom of data display/move to the bottom of the show

Figure 2 Results of the Select query Note that you must press the F9 key to execute the query. This is just one of several old keyboard and graphical user interface choices, but this suggests that isql is somewhat stale. Mouse is not working on the bash console running the Gnome terminal. But it can sometimes be very precise to determine where you are in the click.

ISQL contains an interface to execute SQL queries, and it can also be used for many other database management tasks. But Sybase also provides a more user-friendly database management interface in the new Sybase Central Java Edition (Java version of Sybase). In order to run it, you must have a working JDK, unfortunately, the JDK is not a core part of Redhat or other Linux distributions. I use the jdk117_v3 of the Blackdown Transplant Program (see appendix). Note that Sybase is using JDK version 1.1, which does not require the latest Blackdown or other JDK version 1.2.

$SYBASE/sybcentral32/java/scjview

The first thing you should be aware of is that Sybase is displaying some unclear fonts (see Figure 3), which is most likely a JVM rather than an application issue, but it would be better if you applied the allowed font changes. Sybase claims to be tackling the problem. The following screenshot is a case of connecting to the database server example already started above. You must specify the server with the host name or IP address. The port is a standard Sybase port (2638) and the database name is Asademo. This is really just the front end of a JDBC query that sets the URL of a database connection and initializes a powerful collection of classes to display various database components in a tree structure (we'll see some of the underlying JDBC used in this article). Applications use the Swing Java user interface class (Sybase self Band, so there is no need to download them separately), and you can change the appearance at run time. Unfortunately, these display options do not improve the font selection.

Figure 3 A sample database with Sybase the Java edition connection the package has excellent documentation on the CD-ROM and is organized in HTML and cross-referenced. Sybase does try to make it quick and easy for users to access the package, and it shows this effort in documentation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.