Sybase Database

Sybase, a subsidiary of SAP, builds a client/server relational database management system. Products include Adaptive Server Enterprise (ASE), Adaptive Server Anywhere (ASA), Sybase Unwired Platform (SUP) for mobile applications, Afaria for enterprise mobile device management and IQ for data warehouse and big data applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Experts,

To insert or update 2000 records in Ultralite Database through iOS application, it takes more than 2 minutes. How to reduce the time of insertion/updations?
We are using an EAV based data model to store data from files that we read in. All the data is related to a master record. We need to visualise this master record (charts, aggregations, reporting etc) and using EAV based model directly for this would be very slow. We need to pivot EAV into a flat structure where each record is on a single row.

The problem that we have is that the attributes/properties (which are then used as columns in mart) need to be flexible. Is there a way to design a mart which is pivoted as much as possible so is performant but is also flexible in that adding/removing attributes/properties does not require changing mart (and associated ETL).
In sybase why when we need to convert pages into MB or MB into pages it must multiply / divide by 512 ??
How would you revise the following update statement to include WHERE
AgeDays (an integer field) that exists in both tables has the highest AgeDays value for tbl_SMR_OpenItemsHistory?



        UPDATE tbl_SMR_OpenItems
         SET tbl_SMR_OpenItems.FootNote = tbl_SMR_OpenItemsHistory.FootNote
         FROM tbl_SMR_OpenItemsHistory WHERE
         (tbl_SMR_OpenItems.Office = tbl_SMR_OpenItemsHistory.Office)
         AND (tbl_SMR_OpenItems.Bank =tbl_SMR_OpenItemsHistory.Bank)
         AND (tbl_SMR_OpenItems.TransDate=tbl_SMR_OpenItemsHistory.TransDate)
         AND (tbl_SMR_OpenItems.ProcessDate=tbl_SMR_OpenItemsHistory.ProcessDate)
         AND (tbl_SMR_OpenItems.T=tbl_SMR_OpenItemsHistory.T)
         AND (tbl_SMR_OpenItems.Type=tbl_SMR_OpenItemsHistory.Type)
         AND (LTRIM(RTRIM(tbl_SMR_OpenItems.Description)) = LTRIM(RTRIM(tbl_SMR_OpenItemsHistory.Description)))
         AND (tbl_SMR_OpenItems.Amount=tbl_SMR_OpenItemsHistory.Amount)

Thus, if the records match for all field values, then select the tbl_SMR_OpenItemsHistory record that has
the highest value for tbl_SMR_OpenItemsHistory.AgeDays
Dear EE,

i have 2 clustered sql  servers, i did the step in the link below to move the temp db to another drive

after restarting the server, the sql db instance services are stopped, the temp db and its log files remained in the same drive, no files are created in the new drives, i saw in the windows log an error saying the unable to find the mdf file in D:\tempd\.mdf

this means that actually the path for the temp db is moved to the new drive but without creating the temp db files

your help is extremely appreciated
Usng Sybase Adaptive Server Enterprise 15.5, to modify an existing Stored Procedure what statement do I use?

In SQL Sever, I use ALTER PROCEDURE [stored procedure name]
Is there a quick way to clean up all the data in a mailbox on Exchange 2010 ?

Hi All

Good evening.

Experiencing a slow performance issue for a batch process on a 10 core box with 200 GB total RAM.
Sybase ase 15.7 on HP-Ux11.31. Database on file-system. Database partitioning option enabled.

Would like to know the how to enable/utilize parallel query if required, the proper config values for the related sp_configure options and any impact on any other sp_configure options.

Group: Processors

 Parameter_Name                 Default_Value Memory_Used Config_Value Run_Value    Unit                 Type                
 ------------------------------ ------------- ----------- ------------ ------------ -------------------- -------------------- ------------------------------
 max online Q engines                     0             0            0            0 number               static              
 max online engines                       1          4970            1            1 number               static              
 network polling mode              threaded             0     threaded     threaded name                 static              
 number of Q engines at startup           0             0            0            0 number               static              
 number of disk tasks                     1             0            1            1 number               dynamic              
 number of engines at startup             1             0            1            1 number               static              
 number of …
Good evening All

I need some information/advice on using RAW Disks for Sybase ASE 15.7 database backups. On HP-UX. Can someone please shed light on the benefits & shortcomings of the same please.

Thank you
I am trying to print the column names as a data grid header but when I run the program it prints the column name as a table data. Can any one please help me out?

Imports System.Data
Imports System.Data.SqlClient
Public Class frmNextBCTable
    Dim sqlConn As SqlConnection
    Dim reader As SqlDataReader
    Dim cn As New SqlConnection
    Dim rs As New ADODB.Recordset()
    Dim command As SqlCommand
    Dim dbDataSet As New DataTable
    Dim sql As String
    Dim sTankPassToSetup As String 'Module Variable
    Dim strINIFile As String
    Dim Hold_Active_Status As String
    Dim TankID As String
    Dim WeightsCount As Integer
    Dim HoldRowNumber As Integer
    'Dim EditWeights As Boolean
    Dim NewSetBit As Boolean
    Dim RemoveSetBit As Boolean
    Dim LockData As Boolean
    Dim PassBit As Boolean
    Dim sda As New SqlDataAdapter
    Dim query As String
    Dim query2 As String
    Dim Active_Status2 As String
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    End Sub

    Private Sub frmNextBCTable_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        sDataBaseString(2) = "data source=;user id=sa;password=;initial catalog=processtwo"
        Dim strConnection As String = sDataBaseString(2)
        Dim cn As SqlConnection = New SqlConnection(strConnection)
        Dim bSource As New BindingSource

Open in new window

Over the weekend, we applied the updates on our 2008 R2 Standard server. This server is a virtualized machine. We use this machine to run our QuickBooks Database Manager software and store the quickbooks file.

After rebooting server, we can no longer open any of our QB files. All services come up normally. However, if any client workstations opens any QB file, the QuickbooksDB23 service immediately stops and the client starts receiving a variety H202 errors or (-6000, -301). This makes sense since that this point, the Database manager service is no longer running.

I contacted support who completely uninstalled the server manager from the server, ran their "clean up" tool, reinstalled the entire application including the front end and tested again with the same error and result. We even tried to open the file from the server directly and it didn't work. It doesn't matter if you try to open the file in single user or multi user mode. The application does allow you to put in credential for the QB file so it doesn't immediately crash the service until after you try to authenticate. (I am logging in as admin in the file).

Their resolution was that QB is not support on a VM because it's too unstable. The work around was to copy it to a local workstation and open it in multi user mode there. For whatever reason, that worked and they want QB to be on physical server not a virtualized one. This install of QuickBooks has been installed on this server for at least 2.5 years …

I am unable to update a Sybase table using SSIS 2008. I have added an "OLE DB Command" to the data flow and entered the SQLCOmmand of:

SET Col1 = ?
WHERE Col2 = ?

But I get the warning
Please can someone advise how I can update a Sybase table using SSIS?
Hi ,

I want to know how may I find the how much memory and CPU consumption of a SQL server for the currently running SSIS packages?

thanks in Advance
Hi Experts,

Please excuse the lenght of this mail. It contains many required details.

I am Installing a 3 node Sybase cluster on Sybase ASE Cluster Edition 15.7 SP122 on HP-UX B.11.31

I need help please, How do i configure and present the raw disks to Sybase?

* Although qrmutil says that the devices are fence capable.
eg: qrmutil --fence-capable=/dev/rdisk/disk39

Executing command 'test fence capability', argument '/dev/rdisk/disk39'...

Device '/dev/rdisk/disk39' is fence capable.

Command 'test fence capability', argument '/dev/rdisk/disk39' succeeded.

qrmutil execution completed.

* I am receiving the below msgs while trying to build the cluster through sybcluster
Would you like to check whether this device supports IO fencing capability (Y/N)? [ Y ] Y
Validating the device /dev/rdisk/disk90 for IO Fencing Capabilities.
This device does not have SCSI-3 PGR capability. It does not support I/O fencing
Do you want to continue (Y/N)? [ N ] Y
Validating the device /dev/rdisk/disk107 for IO Fencing Capabilities.
This device does not have SCSI-3 PGR capability. It does not support I/O fencing
Do you want to continue (Y/N)? [ N ] Y
Validating the device /dev/rdisk/disk183 for IO Fencing Capabilities.
This device does not have SCSI-3 PGR capability. It does not support I/O fencing
Do you want to continue (Y/N)? [ N ] Y

* Raw-disk Configuration on each node:
Assigned the below permissions to each database and quorum disk.
(since this is a …
I am working with an organization that has an application with a Sybase database.  The vendor of that software has changed the database to MS SQL.  Initially, the vendor made a big deal about the migration/conversion process.  Since it's the same vendor, I'm thinking that it should not be a big deal.  When I asked them what migration tool they are using, they said that they are using straight SQL.

Does that mean that in the development of the new MS SQL database, they used the tables in the entity relationship diagram of the Sybase database, and mapped the new database tables in the MS SQL database, and they used SQL to "transfer" the fields to the new database?  ... and as such the migration or the conversion, should be easy with any major problems?

Thank you.
Hi Experts,

I am using SyBase SQL Anywhere v10. Here is my query:

select punchpayroll.opendate, empnum, payrate, jobtype, reghours, othours, punchin, punchout, length, overtimepay 
from dba.punchpayroll, dba.overtime, dba.overtimehourrule 
where punchpayroll.punchindex = overtime.punchindex and overtime.ruleid = overtimehourrule.ruleid and punchpayroll.opendate between 20150101 and 20150115

Open in new window

And it generates the attached RESULTS. If you see there in the highlighted red box I am trying to get those 2 results on the same line BUT have the Overtime 150 and 200 separated out. See DESIRED RESULTS.


I am trying to use an open query on InterSystems Caché through a linked server.


FROM OPENQUERY([LinkedServer], 'SELECT * from Table')


OLE DB provider "MSDASQL" for linked server "INQUIRE" returned message "[Cache ODBC][State : 37000][Native Code 1]
[C:\Program Files\Microsoft SQL Server\MSSQL11.BISQL02\MSSQL\Binn\sqlservr.exe]
[SQLCODE: <-1>:<Invalid SQL statement>]
[Cache Error: <<SYNTAX>errdone+2^%qaqqt>]
[Details: <Prepare>]
[%msg: < SQL ERROR #1: IDENTIFIER expected, [ found^SELECT [ AccidentCode ] from [>]".
Msg 7321, Level 16, State 2, Line 4
An error occurred while preparing the query "SELECT [AccidentCode] from [ADMITDISCH]" for execution against OLE DB provider "MSDASQL" for linked server "INQUIRE".
Hello Experts,

I have a table called header that contains 2 columns SNUM and Time. I am trying to select the highest value of time per group. See attached image.

Expected result is:
SNUM         Time
1                 1/22/15 1:45AM
2                 1/22/15 3:25AM
3                 1/22/15 2:05AM

SyBase SQL Anywhere v10
Hey guys,

Here is my SQL

   "select t.opendate as 'OpenDate', t.Transact as 'Transaction', t.NetTotal as 'HeaderNet', isnull(sum(d.Quan*d.CostEach), 0) as 'DetailNet', t.FinalTotal as 'HeaderFinal',  t.TenderTotal as 'HowPayAppTotal' " _
        & "from dba.posDetail d, " _
        & "(select h.opendate, h.Transact, h.NetTotal, h.FinalTotal, sum(p.Tender) TenderTotal " _
        & "from dba.posHeader h, dba.howpayapproved p " _
        & "where h.Transact = p.Transact and h.opendate between " & lbl_SrchStartDate.Text & " and " & lbl_SrchEndDate.Text & " group by h.opendate, h.Transact, h.NetTotal, h.FinalTotal) t " _
        & "where t.Transact *= d.Transact " _
        & "and d.prodtype not in (101) " _
        & "and opendate between " & lbl_SrchStartDate.Text & " and " & lbl_SrchEndDate.Text & " " _
        & "group by t.opendate, t.Transact, t.NetTotal, t.FinalTotal, t.TenderTotal " _
        & "order by t.transact"

Open in new window

The problem is if there is no record in  t.TenderTotal as 'HowPayAppTotal' then the whole row is skipped and not returned. I want a 0 to be returned if something is missing rather than omitting the whole row.
Hey guys,

I have 3 tables that I would like to query. All of them reference each other using column Trans. Please see attached for an example of the 3 tables and an example of the expected result.

I am using SyBase SQL Anywhere v10
I was deleting from a table and mistakenly executed the delete statement twice which caused the error.

Can someone help me understand how to set up Sybase environment variables in Linux.

When i try isql/bcp i am getting error.

Good Morning All,

I am in need of some expert advice.  My environment is set up as follows:  
Database:  Sybase ASE 15.7, Open Client 15
Language:  Java 1.7.0_45

I have a stored procedure that is raising an error but java is not catching it.  Is there any way that I can force it.  I see ways to do this in other databases but nothing for Sybase.

I am performing a batch update using prepared statements and the update being called to perform the update is where the raiserror is thrown.
Hello Experts,

I have a unique situation where I need to group by a column but the column has the data stored in a way where I cant figure out how to group by. The DB table in question contains employees and which store they have access to (S1 = Store1, S2 = Store 2, S17 = Store17, etc). I want to see all employees grouped by stores they have access to. As an example, employee "KRISHNA C." would have be apart of stores: 1, 4, 5, 6, AND 7. (see attached)

This is SyBase SQL Anywhere v10
Hi there

We are trying to write PDF, Word, JPG and other binary files to a Sybase SQL Anywhere database using PHP.

We are connecting with PHP using PHP_DBLIB through PDO and are using the code below to read and a file and write into a column:

// Read file
$filename = “/path/to/file/pdf.pdf";
$handle = fopen($filename, "rb");
$contents = fread($handle, filesize($filename));

// Attempt to write file
$query = $db->prepare('INSERT INTO table_name (id, document_blob) VALUES (1, ?)’);
$query->bindParam(1, $contents, \PDO::PARAM_LOB);

The whole query just fails with a generic error message, however we are able to use the above code to write to a MySQL database.

Any thoughts / inspiration gratefully received.


Sybase Database

Sybase, a subsidiary of SAP, builds a client/server relational database management system. Products include Adaptive Server Enterprise (ASE), Adaptive Server Anywhere (ASA), Sybase Unwired Platform (SUP) for mobile applications, Afaria for enterprise mobile device management and IQ for data warehouse and big data applications.

Top Experts In
Sybase Database

No Top Experts for this time period. Answer questions to earn the title!