We help IT Professionals succeed at work.

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.

Customer using Sybase SQL Anywhere 11 was hacked and we have gotten them back up.

We are getting "Sybase Central - The Service xxx has generated an unknown error" when attempting to start service using Sybase Central.
Have also attempted to start via windows services and service starts and immediately stops
Application log entry shows "Could not start server" keyword 0x80000000000000

Service Properties are:
C:\Program Files\SQL Anywhere 11\Bin32\dbsrv11.exe
parms:  -o c:\agricom\sql11.log -n sam C:\agricom\sam\samsb.db -c 500m -x tcpip
Local Account, service is NOT allowed to interact with desktop
Have tried with/without "This service belongs to a service group"
No polling

Have dropped service and recreated but same error

Database starts okay via ODBC using Central or ISQL
Sybase bcp in tuning needed

Hi, my bcp in is taking too long. Its running in batch of 5000 but taking too long. The bcp file is 30GB, taken from sybase bcp out. The table has text data too , the table size is 31GB and file size is 30GB. Its running too slow.
Used packets size of -A 8192 and 16284 too.
Increased number of pre-allocated extents to 32 too but no help.

Experts please advise. Otherwise this bcp will take ages to complete
Hi Experts,
I have a SAP 16 database server on Windows 2012 R2 which has 2 SAP instances, one of them is running normally and I can restart it.
the other one is down and when I try to start it, I get the following error message:

00:0000:00000:00000:2019/11/25 04:27:50.64 kernel  SySAM: Failed to obtain license(s) for ASE_CORE feature from license file(s) or server(s).
00:0000:00000:00000:2019/11/25 04:27:50.64 kernel  SySAM: No such feature exists. Verify that a license containing the feature name ASE_CORE is available or generate and deploy the license from the SAP Support Portal.
00:0000:00000:00000:2019/11/25 04:27:50.64 kernel  SySAM: License feature name:  ASE_CORE
00:0000:00000:00000:2019/11/25 04:27:50.64 kernel  SySAM: License search path:   C:\SAP\\SYSAM-2_0\licenses\SySAMLicenseServer.lic;
00:0000:00000:00000:2019/11/25 04:27:50.64 kernel  SySAM: FlexNet Licensing error:-5,357
00:0000:00000:00000:2019/11/25 04:27:50.64 kernel  There is no valid license for ASE server product. Installation date is not found or installation grace period has expired. Server will not boot.

All I need to do is to start this instance by a development license. How can I do this?
Note: Number of user connections is 25 and online engines at startup is 1

Daniel Mina

i have table with millions o records , it contain card data , i want to mask this card data value , check below example :

Original Data : asd1234 4078932167883902 7392137198

New value: Original Data : asd1234 4078930000003902 7392137198

whats the best way to do that ?

I am using BCP (Bulk copy command)  to transfer csv file which is changing blank column with space to ASCII NUL after the file download.
How can I prevent this from happening?
Here is my SQL field:

isnull(convert(varchar, birthdate, 101, '') DOB
So basiclly, I am converting the Date to String and when the field has no value, after the file download using BCP, in notepad it displays a space, and NUL if I view notepad++ .

any help will be appreciated.
: Client Connectivity  Failing  with CT-LIBRARY error:
        ct_connect(): network packet layer: internal net library error: Net-Lib protocol driver call to connect two endpoints failed

Open in new window

 Sybase instance in setup to run on port 5000 . netstat -a confirms that 5000 is listening .  Am able to connect to the server locally using isql  i.e from the server itself.  However, from any other outside client source the port looks closed. I have enabled the trace and have checked for the connectivity errors.

“Failed to connect to the server - Error is 10060 A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Open in new window


Listener Status

1> sp_listener 'status'
2> go
         port                       …
Sybase --- sp_depends when i run for a stored proc A , it doesn't showing all the dependencies. Its missing some stored procedures which are called from inside the parent stored procedure A.
How can this be corrected ?
Hi Experts,
I have a problem restoring Sybase database from Sybase 15.7 to SAP 16, on the same instance I did restore another database from the same Sybase server with no issues.
The problem happens in the online database step, load command complete successfully. Both Sybase servers are running on Windows OS.

Below is the output for online database command:

Started estimating recovery log boundaries for database 'XX'.
Database 'XX', checkpoint=(4834613, 16), first=(4834613, 16), last=(4834613, 16).
Completed estimating recovery log boundaries for database 'XX'.
Started ANALYSIS pass for database 'XX'.
Completed ANALYSIS pass for database 'XX'.
Recovery of database 'XX' will undo incomplete nested top actions.
Database 'XX' appears to be at an older version '15.7' than the present installation at version '16.0 SP01 PL02'; ASE will assess it, and upgrade it as required.
Database 'XX': beginning upgrade step [ID     2]: validate basic system type data 
Database 'XX': beginning upgrade step [ID    75]: executing SQL statement ("update syscolumns set type=66, user...")
0 row(s) affected.
Database 'XX': beginning upgrade step [ID     9]: executing SQL statement ("if exists (select 1 from syscolumns...")
Database 'XX': beginning upgrade step [ID    10]: alter table (table sysobjects)
Database 'XX': beginning upgrade step [ID    69]: executing SQL statement ("if 2 = (select count(name) from sys...")
0 row(s) affected.
Database 'XX': beginning upgrade step [ID    

Open in new window

One of the deletes is taking very long and is showing very huge logical ios but no 0 physical io's.
the same proc is taking 10-12 minutes in prod but in INT its taking too long.
Prod and INT database server has same configurations, same cfg file is used to bring up the database server.

the query plan shows work table in prod but not in INT, though both show table scans.

what can be the reason for this strange behaviour in INT.  The INT is loaded from prod, tables are reorged and update stats performed too.
In one my tables (not very big, just 700 MB) , the performance for some of the queries goes bad in few days. I did some analysis and found that one of the index on that table , its large i/o efficiency value keeps going down and becomes 0.4.  when we do full reorg rebuild it becomes 1 and performance improves.
I want to know why the large io efficiency values goes down. there are around 1million DML operations on that table on daily basis.

sybase experts please throw some light as always you do.
I am working with Sybase Replication 12.6 using MSA.  There are reports that run against about 60 tables in the replicated database.
The application team wants to suspend updates to those tables while the reports  are  running.  The report takes approximately one hour.
There are about 100 other critical tables in this database and they prefer not to suspend the connection for the entire database.

It seems I can create a 2nd database and define a subscription but there are a few tables that are extremely large that are not part of the report.
If  I define a subscription for a 2nd replicated database, I need to perform a dump/load- so this replicated database will need to be as large
as the source database and unfortunately with Sybase 12.6, I can't shrink the database - totally wasted space.

Basically, what I need in addition to my MSA replicated database is a snapshot of the database or a subset of the database.
Is there a way to suspend updates for only the tables in the report for my current replicated database?

I thought about creating a database at primary with only views for the tables in the report then trying to replicate that database.
Then I can suspend connections to that database.  Any reason this will not work?

Any other ideas on how to accomplish this?


I am MS SQL DBA and I am now going to study Sybase feature.

1) did sybase has horizontal scale out feature like MS SQL always on?
2) what is the tools (cost/free) tools that detect problematic query ? slowest query at run time?
3)  any tools to detect which part of the slowest query cause the problem?
4) what is the monitoring tools you all use can monitor most of the Sybase problem.
5) any tools help on detecting Sybase query anti pattern ?
6) any tools help on checking missing index and unused index?
7) what is the best backup tools for Sybase.
8) any read only round robin load balancing operation across sybase node?
9) admin and developement tools usually used by sybase DBA and why that?

Any one can tell me what kind of HA , DR solution Sybase is using ? only replication  ?

latest version of Sybase I tried is ASE 15.7!

What monitoring tools , admin and development tools you guys can introduce  for Sybase ?
How to do large set of data movement from SAP ASE/ ASE IQ server to other RDBMS say SQL server.??
The data is need to move is around 2-3 TB , could you please provide a complete step to step approach.
My Sybase IQ tables are too big. A detailed explanation will be highly appreciated.

Hi Experts,
I need to change one of my Sybase databases to be "Inactive", I need to know the value to be updated in "status" column in "sysdatabases" system table.

Daniel Mina
Hi Experts,
I need installation packages for Sybase ASE 12.5, 15.0.3 & 15.5 on Linux. Could anyone send to me a download link?

I have few big tables each of size 40-50GB , the index creation is taking too long on them. Is there a way i can speed up the index creations ??
This is in sybase 15.7 version.
I have a SQL query and it is using different query plans with different login.
Both the login have sa roles and other previliges. one login is "sa" and other login "application login" but has role too.
Both are binded to default tempdb but showing different query plan for same query.
How can i correct it, and ensure they use same query plan.
Hi, could you please provide me the new features of sybase SAP ASE 16 version for DBA's and Developers.
I have searched lot on net but mostly find some generic features.
I need whats new for developers ?

One of my SQL queries is picking up the index sometimes and sometime it does the table scan. I can see in the show plan , sometimes it picks up the index but other times does the table can.
I have run the update stats on the table many times and even done reorg rebuild but still the issue persists.
Can you please advise what all to check or make changes so that optimizer picks up the right index always. ( i dont want to force the index on the table)
Please advise.
Dear sybase experts,

I have a big table where i am trying to run the reorg rebuild but database space is not much and hence its failing. Table size is approx 30GB and space left in database is also 30GB. Is there a way without increasing database space i can complete reorg rebuild.

Can someone please help me to change my query slightly?

I have a simple database table  which is named "City". It includes the id of the district, and last names of people in the district.
As you can see in the sample table the last names occur more than once, as there are many people in the city with the same last name in different districts.

I have a query which counts the number of unique names in the city by district. The name will not be counted more than once. Meaning if it was already counted in a previous district, it won't be counted again. So for example you can see in the query result that last name "Marconi" was only counted once, as it was counted in District 1, but not District 2.

The query works great, but it needs to be modified slightly so that it will also display the total of all of the names in a district, regardless if there are repeat names in a district. Please see the "Desired result" below to see what I need my query to produce. Attached is a copy of my table with data which can be recreated in sql server by running the attached script. My sql is very generic, so that it runs on other sql platforms like Sybase and Oracle.

My Working Query :
select t.Cityid, t.DiD, count(FamilyName) AS DistinctFamilyNames
from (
            CityId, MIN(DistrictId)AS DiD,FamilyName  
    from City WHERE CityId = 'Austin' Group By CityId,FamilyName
    ) t
group by t.CityId, t.DiD;

City table :

CityId  DistrictId        …
Suppose I have a City which is divided into districts.

I have a database table  which is named "City". It includes the id of the district, and last names of people in the district.
As you can see in the sample table the last names occur more than once, as there are many people in the city with the same last name.

What I need is a query which will display the data broken up into the CityId, the DistrictId, and the unique last name of each person in each district. Note that the count of a last name should not occur more than once. So if the same district has 10 people with the last name of "Brown" that name should not be counted more than once. Also if the name was already counted in another district, is should not be counted again in a different district.

City Table :
CityId  |  DistrictId | FamilyName
Austin  |  1          | Brown
Austin  |  1          | Brown
Austin  |  1          | James
Austin  |  1          | Maroni
Austin  |  2          | Maroni
Austin  |  2          | Trevor
Austin  |  2          | Jones
Austin  |  3          | Brown
Austin  |  3          | Greyson
Austin  |  3          | Maroni
Austin  |  3          | Nantula

Query result :

Austin | 1 | Brown
Austin | 1 | James
Austin | 1 | Maroni
Austin | 2 | Trevor
Austin | 2 | Jones
Austin | 3 | Greyson
Austin | 3 | Nantula

I have a sql query which will return the correct result in sql server, but it will not work in Sybase, because Sybase…

We are running ASE 15.0 (with character set latin-1 on Solaris 10).  We want to convert the charset of database server from latin-1 to UTF-8 to support  Chinese characters.
can anybody help us to list the steps involved in this charset conversion?  We understand we may have to bcp out/in all the tables unless the data stored in tables are only ASCII-7.  Is there any easy method to convert to UTF-8 without bcp in/out?

We have setup Warm standby using Sybase Replication Server. Do we need to change the charset of Replication server too to support UTF-8 along with dataserver? Kindly advise.

SELECT Professor_Name, Salary FROM SALARIES WHERE Salary > (SELECT MIN(Salary) FROM SALARIES) * 4;
why above query not working
please advise

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!