SQL Anywhere new features

Following is a list of new features in SQL Anywhere version 12.0.1.

For information about changes to the list of supported platforms, see [external link] http://www.sybase.com/detail?id=1061806.

  • Enhancements to support for spatial data   The following enhancements have been made to the spatial data support in SQL Anywhere:

    • Improved performance   Substantial performance improvements have been made for the following spatial operations:

      • Loading time for shapefiles

      • Loading of polygons and multipolygons and collections containing polygons belonging to round-Earth spatial reference systems

      • Loading of complex polygons and multipolygons (for example, polygons defined by many rings or rings containing many points)

      • Spatial set operations such as ST_Union and ST_Intersection applied to complex geometries

      • Spatial predicates such as ST_Contains and ST_Intersects

      • Spatial predicates where one of the geometries is a point

      • Spatial predicates applying ST_WithinDistance or ST_Distance to indexed round-Earth geometry columns

    • Interactive SQL: Import Wizard now supports shapefiles   The Import Wizard now includes an option for importing ESRI shapefiles. See Import data with the Import Wizard (Interactive SQL).

    • Interactive SQL: New FORMAT SHAPEFILE and SRID clauses for the INPUT statement   The INPUT statement now supports loading ESRI shapefiles using the FORMAT SHAPEFILE clause. The SRID clause has also been added to the INPUT statement for specifying the SRID to use when loading the shapefile. See INPUT statement [Interactive SQL].

    • New st_geometry_load_shapefile system procedure   The st_geometry_load_shapefile system procedure allows you to load an ESRI shapefile by providing the name of the file, the SRID to use for loading the data, and the name of the table to create and load the data into. The columns for the table are taken from the column names specified in the shapefile. See st_geometry_load_shapefile system procedure.

      Note

      You must upgrade your database to access this new stored procedure.

    • New database option to specify ST_CircularString interpolation tolerance   The st_geometry_interpolation option has been added to control the interpolation of ST_CircularString geometries. See st_geometry_interpolation option.

    • Enhancements to ST_WithinDistanceFilter   The spatial predicate ST_WithinDistanceFilter is now supported for geometries in round-Earth spatial reference systems. See ST_WithinDistanceFilter method for type ST_Geometry.

  • Enhancement to java_class_path option   You can now use the java_class_path database option to specify the classes and JAR files that the system class loader should add to the classpath before launching the Java VM. This option is useful when your application must provide the directories or JAR files. See java_class_path option.

  • New MATVIEW ODBC connection parameter   Using the MATVIEW connection parameter, you can specify the string to return for the table type of materialized views when the ODBC function SQLTables runs. By default, the value that is returned by the SQLTables function is VIEW. See MatView (MATVIEW) connection parameter.

  • New -kp database server option   You can now use the -kp option to specify the server principal in the standard form of server-name/hostname@REALM. The -kp option enables Kerberos authenticated connections to the database server. See -kp dbeng12/dbsrv12 server option.

  • PartnerState property enhancements   The PartnerState property now returns one of the following values when used with the DB_PROPERTY function:

    • connected   There is a connection from the current server to the specified server and a connection from the specified server to the current server.

    • incoming only   There is a connection from the specified server to this server.

    • outgoing only   There is a connection from this server to the specified server.

    • disconnected   There are no connections between this server and the specified server.

    • NULL   The database is not mirrored.

    See PartnerState database property.

  • MirrorServerState property enhancements   The MirrorServerState property now returns one of the following values when used with the DB_EXTENDED_PROPERTY function:

    • connected   There is a connection from the current server to a specified server and a connection from the specified server to the current server.

    • incoming only   There is a connection from the specified server to this server.

    • outgoing only   There is a connection from this server to the specified server.

    • disconnected   There are no connections between this server and the specified server.

    • NULL   The database is not mirrored.

    See MirrorServerState database property, DB_PROPERTY function [System], and DB_EXTENDED_PROPERTY function [System].

  • New sp_forward_to_remote_server procedure   You can use the sp_forward_to_remote_server stored procedure to allow an application to execute a SQL statement on a remote server and retrieve result sets generated by the statement. See sp_forward_to_remote_server system procedure.

    Note

    You must upgrade your database to access this stored procedure.

  • New sa_user_defined_counter_add system procedure   You can use the sa_user_defined_counter_add system procedure to change the value of a user-defined property. See sa_user_defined_counter_add system procedure. See sa_user_defined_counter_add system procedure.

    Note

    You must upgrade your database to access this stored procedure.

  • New sa_user_defined_counter_set system procedure   You can use the sa_user_defined_counter_set system procedure to set the value of a user-defined property. See sa_user_defined_counter_set system procedure.

    Note

    You must upgrade your database to access this stored procedure.

  • SQLANYSAMP12 environment variable   The Unix and Mac OS X installer now sets the SQLANYSAMP12 environment variable in the sa_config and sample_config scripts. On Unix, the sample_config script may be used to create a per-user copy of the samples. This is useful for a multi-user installation. For single-user installations, the sa_config script sets SQLANYSAMP12 to $SQLANY12/samples. See SQLANYSAMP12 environment variable and Unix and Mac OS X files.

  • IN parameters of data types LONG VARCHAR, LONG BINARY, and LONG NVARCHAR are now allowed in remote procedure calls   A remote procedure call can now contain IN parameters of data types LONG VARCHAR, LONG NVARCHAR, and LONG BINARY. In addition, parameters of data types VARCHAR, NVARCHAR, and BINARY are no longer restricted to 255 bytes. See Creating remote procedures (Sybase Central).

  • USING clause of the CREATE SERVER statement can now contain variables   The USING clause of a CREATE SERVER statement can now contain variables. This feature allows users to create dynamic remote data access servers. See CREATE SERVER statement.

  • Remote data access can load the SQL Anywhere ODBC driver directly   You can define a remote server so that remote data access loads the SQL Anywhere driver directly, bypassing the ODBC driver manager on both Windows and Unix platforms. When defining the remote server, use the syntax below, followed by the remainder of the connection string:
    CREATE SERVER remote-server CLASS 'saodbc' USING 'DRIVER=SQL Anywhere Native;...';

    If there are multiple SQL Anywhere remote servers defined without using DRIVER=SQL Anywhere Native', then remote data access still uses a driver manager for the other remote servers.

  • AT clause of the CREATE EXISTING TABLE statement and CREATE PROCEDURE statement can now contain variables   The AT clause for the CREATE EXISTING TABLE and CREATE PROCEDURE statements can now contain variables. This feature allows users to map a proxy table or proxy procedure to multiple remote tables or procedures. See CREATE EXISTING TABLE statement and CREATE PROCEDURE statement.

  • Enhancement to the RAISERROR clause of the MERGE statement and to the RAISERROR statement   By using the RAISERROR statement, the SQL Anywhere database server allows an application to raise a customized error. The database server also provides a built-in global variable, SQLCODE, whose value can be examined to determine the specific error raised during the execution of the last statement on the current connection. The database server now reports the user-specified error number for SQLCODE instead of a fixed -631 error message. See MERGE statement and RAISERROR statement.

  • VALIDATE TEXT INDEX statement   You can use the VALIDATE TEXT INDEX statement to verify that the positional information for the terms in the text index is intact. If the positional information is corrupted, an error is generated. See VALIDATE statement.

  • Extended syntax for TOP and LIMIT clauses   The TOP { ALL | limit } START AT startat and LIMIT limit [ OFFSET offset ] clauses now support simple arithmetic expressions for the limit, offset, and startat arguments. TOP supports the ALL limit, indicating that all rows are to be returned after the specified startat value. The maximum value for ( limit + offset ) and ( limit + startat -1 ) has been increased to 9223372036854775807 = 2^64-1.

    See:

  • SQL Anywhere OLE DB provider now supports the DBTYPE_DBTIMESTAMPOFFSET data types   The SQL Anywhere OLE DB provider now supports the DBTYPE_DBTIMESTAMPOFFSET data types. DBTYPE_DBTIMESTAMPOFFSET (146) is an OLE DB type that supports the TIMESTAMP WITH TIME ZONE (or DATETIMEOFFSET) data type. Support for this data type facilitates transfer of data tables between SQL Anywhere databases and other database management systems (including SQL Anywhere).

  • Web services now supports improved control of HTTP redirect operation   The new SET REDIR clause of the CREATE PROCEDURE and CREATE FUNCTION statements provides control of the maximum number of re-directions allowed and specifies which HTTP statuses to automatically redirect.

    A web service procedure specifying a POST HTTP method that receives a 303 status issues a redirect request using the GET HTTP method.

    HTTP client procedures now handle relative path re-directions. Previously, re-directions would only succeed if the server had provided an absolute URL.

    A GET method receiving a redirect only provides the query component as specified by the redirect response's location header URL. A POST method receiving a redirect, issues a request URL containing the path and query components as specified by the redirect response location header. Its body contains the query component as generated by the procedure.

    Query parameters can now be specified both within the URL clause and (automatically generated) from parameters passed to a procedure. This only applies to procedures specifying a GET HTTP method,

  • Secure web services now supported on Windows Mobile   Web service procedures that use HTTPS and HTTPS_FIPS are now supported on Windows Mobile.

  • SQL Anywhere JDBC driver now supports PreparedStatement.setClob()   The SQL Anywhere JDBC driver now supports PreparedStatement.setClob().

    In previous releases, the SQL Anywhere JDBC driver provided support for PreparedStatement.setBlob, ResultSet.getBlob, and ResultSet.getClob. The SQL Anywhere JDBC driver now supports two of the three PreparedStatement.setClob methods. These are listed below.

    PreparedStatement.setClob( int parameterIndex, Clob x )
    PreparedStatement.setClob( int parameterIndex, Reader reader, long length )

    The following variation is not supported by the SQL Anywhere JDBC driver.

    PreparedStatement.setClob( int parameterIndex, Reader reader )

    When using the PreparedStatement.setClob( int parameterIndex, Clob x ) overload, the user-supplied Clob implementation only needs to support the Clob.length and Clob.getCharacterStream methods. Also, for large strings and large character streams, the new PreparedStatement.setClob methods within the SQL Anywhere JDBC driver are preferable over the PreparedStatement.setString and PreparedStatement.setCharacterStream methods in terms of both performance and memory usage. See JDBC support.

  • SQL Anywhere Java VM ClassLoader now supports shutdown hooks   The SQL Anywhere Java VM ClassLoader that is used in providing Java in the database support allows applications to install shutdown hooks. See Shutdown hooks in the Java VM.

  • SQL Anywhere .NET SetupVSPackage installer   The SetupVSPackage application now performs several installer functions such as updating the Global Assembly Cache and the Windows Microsoft.NET machine.config file. If SQL Server 2008 or later is installed on the system, SetupVSPackage also installs two mapping files called MSSqlToSA.xml and SAToMSSql10.xml in the SQL Server DTS\MappingFiles folder. See .NET client deployment.