Sybase specific features

 

SQL4X Manager J recognizes the type of database server you are connecting to and presents special options based on your selection. This page explains the special options available for Sybase database servers.

 

Special support for Sybase features

 

Server and connection status views

The status views for your database server and the current connection are available via the corner menu of the Connection list (Database Navigator).

Display Connection Information

If you need to find out more about your database server release or the release number of your JDBC driver take a look at the Connection Information window. To open it select "Display Connection Information..." from the Connection list's corner menu (Database Navigator).

Display Server Status

SQL4X Manager J includes pre-defined status views to retrieve more information about your database server's current workload and status. All status views are available via Database Navigator -> [your Sybase connection] -> Corner Menu -> Special (see snapshot on the left side).

Actually the views retrieve the current database status from the servers Data Dictionary. This means your login users needs the access privileges to read data from dba views to display most status views. If your login user does not have enough access privileges the error message "table or view does not exist" is displayed.

The server status views are optimized for Sybase ASE 12.x. Some of the views will not show any values with earlier Sybase releases as those releases do not provide all the necessary data. For more information on how to read the displayed values see your Sybase documentation.

Modifying Status Views

SQL4X Manager J includes a Script Editor to edit the SQL scripts that are used to retrieve the status views. Select Tools menu -> Script Editor to start the Script Editor and load the script file. Select your Database name (this is the name reported back by your JDBC driver). The Section list defines where a script is displayed. The scripts defined in the CONNECTION, CATALOG, SCHEMA and TABLE section are added to the appropriate section of the Database Navigators Corner Menu.

After changing a script with the Script Editor you have to re-open the Database Navigator window. The script file is only parsed once while the Database Navigator window is opened.

     
 

Manage Database Objects (Stored Procedures, Functions, Trigger, etc.)

SQL4X Manager J includes a special assistant to manage Sybase database objects, display the object source code (including tSQL) and change the objects.

To access the Sybase Object Manager use Database Navigator, select your Sybase connection and the catalog/schema your objects are in. Now open the Corner Menu form the Objects list (see snapshot on the left side) and select "Object Manager..." to open the Object Manager window.

 

To display your objects select the object type (Function, Java Source, Package, Package Body, Procedure, Trigger, Type or Type Body) from the Type selection and click Reload. All objects of the selected type available in the current schema are displayed in the list.

Display and Edit Object Source Code

To display the object's source code select the object in the list. The source code is displayed on the right side. You can modify the source code and click "Update Object" to save the changes back to your database server.

Renaming Objects

If you change the object name in the source code view and click "Update Object" a new copy of this object is created with the new name. The original object is not modified by this action. To rename a object you need to delete the original after creating a copy.

Adding new Objects

Click the + sign on the right side of the object list to create a new object. The Create Database Object sheet is displayed. Enter the new object's name and type in the sheet and click create. You can now enter the source code for your object in the source code view. Click "Update Object" to actually create the object.

Removing Objects

Select the object you want to delete in the object list and click the - sign on the right side of the object list to drop the selecte object.

     
 

Run stored procedures with SQL Viewer and SQL Console

Sybase supports the "EXEC" command to run stored procedures. SQL Console and SQL Viewer both support the EXEC command and display the result set generated by your stored procedure call. If your stored procedure returns more than one result set SQL Viewer displays the result sets as tabbed view and SQL Console displays the results sets as list.

 

exec sp_configure

 

This command executes the sp_configure stored procedure and displays the result set.