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

I got the following error when I was loading a database as usual:

 Volume validation error: bad magic number 0ءّ, expected USTH.

is it because I try to load dump from sybase ase 15.7 onto ase 15.0.3 ??
I read some thing like this :
The 'bad magic number' is usually raised when you attemp to load a backup with and older version of the backupserver than then backserver that made the backup

Loading database from higher version to lower version is possible but we can't use higher version features in this way.

I was sure the oposit is the right case i.e we can load dump from older version onto higher, but cannot load dump from higher version.
advice please.

sysprocesses output in sybase doesnt give database name as sp_who does. how can i get sysprocesses output only for specific database

I need to convert this Sql server sql to Sybase Sql. I am getting an error message : "Incorrect syntax near TOP'. How do I change the code below so that it will run on Sybase?

IF NOT EXISTS (SELECT TOP 1 * FROM sys.columns WHERE NAME = @columnName AND Object_ID = Object_ID (@TableName))
  SELECT @sqlStatement = 'ALTER TABLE ' + @tableName + ' ADD ' + @newAddCountColumn + ' ' + VARCHAR(50) NULL '
  PRINT 'Creating a new column '
  EXEC (@sqlStatement)
Hi, I am wondering what's the typical performance on throughput of Sybase database?

The one I am most interested is the write throughput. The entry should be very simple, one id being an integer, and value being some 500 byte serialized data

Is something around 5K - 20 K per second possible?
Hello Experts,

Running the SQL query below is inflating numbers for net total, transaction count, and labor. Not sure why...

storeinfo.description AS [Store Name],
SUM(posheader.nettotal) AS [Net Total],
COUNT(transact) AS [Transaction Count],
[Net Total] / [Transaction Count] AS [Transaction Average],
SUM(totalwage) AS [Labor]
INNER JOIN storeinfo on posheader.snum = storeinfo.storenum
INNER JOIN punchpayroll on posheader.snum = punchpayroll.snum
posheader.status = 3 AND
posheader.opendate = 20160802 AND
punchpayroll.opendate = 20160802
[Store Name]
[Store Name]

Open in new window


I believe it may have to do with the "transact" column but it doesn't exist in storeinfo or punchpayroll tables.

SQL Anywhere v10
I am not able to create the below Sybase stored procedure. The Sybase error indicates that it does not like the line where
my TRUNCATE command is. The error message says incorrect syntax near @inTable. If I comment out that line where the TRUNCATE is, I can create the stored procedure. However I need to truncate the table. What is wrong with the line where my TRUNCATE statement is located? Can an expert help me out? What is odd is that I can run the truncate with in the command line if I actually
use the name of the table. Like TRUNCATE Table sampleTable

CREATE PROCEDURE dbo.spTruncateTable
@inTable VARCHAR(100) = NULL
   PRINT 'Table Truncated'
In Sybase, I can run this query - select * from sysservers

and get a list of servernames which host my database(s). So how do I find out which databases are associated with my list of servers?

srvid    srvstatus   srvname  srvnetname srvclass
-------    -------------    ------------  -----------------  -----------
1             0                KITOS01   KITOS01        7
2          1024             SPLIISO    SPLIISO         10
Can a Sybase expert look at my Sybase sql below. I am building a query and then I need to pass it off to be executed at line 3 below.
The table being truncated is on a linked server, and so I am appending the server name and database name to the exec statement
on line 2 below. However when my query executes I am getting an error message of "Incorrect syntax near the keyword 'exec' ".
I hard coded the prefix parameter on line 1 below, just for illustration of what I am talking about. However that value is actually created
dynamically in the stored procedure, and is not hard coded, like on line 1.

and tell me if it looks correct? I am getting an error message of illegal
1.    SET @prefix = 'POCOAPPSRV.DBTest.dbo'
2.    SET @sqlString =@prefix +  'exec ' + '  "TRUNCATE TABLE ' + @inParamTableName + '"'
3.    EXEC(@sqlString)
Hello Sybase Experts. I am porting some SQL Server sql to Sybase sql. The SQL Server sql uses several TRY CATCH blocks in sql server.
Is there any similar type of structure in Sybase to handle exceptions? If so, can someone show me how to do it?
   EXEC (@spName)
     -- Recovery code goes here

In SQL server I can get the date in military time using the following Query:
Example of output : 22:03:15.4700000

Is there any type of similar query in SYBASE which can give me the same result?
I am wondering if there are any SYBASE sql coders who can spot any syntax errors at line 355. I am getting this error message,
and cannot spot what the problem is?

Incorrect syntax near '+'.

355  PRINT ' Client Endtered Data On ' + CONVERT(VARCHAR(10),CONVERT(TIME,GETDATE()))

when we use surrogate key in database world. what is its importance of it. please advise
We have a Sybase Database that  needs to sync with a service, however they are asking for a read only DB user. I am not sure there is a default user already in  place. I just need to provide credentials for the Software Vendor.
Hi SQL Admins

I would like to ask you for professional recommendation and suggestions regards new MS SQL server setup.
My plan is to upgrade entire SQL system so it would be reliable and would have Disaster recovery setup.

Let me explain what kind of setup I have.
The previous SQL admin had setup system with 1 standalone SQL server (2008r2)\w attached database and 1 warm server.
SQL DB  have at least 50 instance running at the moment. The performance is not so good.
4000 employees is using this system nonstop.

What would be the best setup that would provide  server and DB great performance,
What would be solution for disaster recover capability (failover)?
What kind of storage system should we use SAN, VM-DB etc?

Also, is it ok to run SQL on VM server (disadvantage and advantage)?

Moreover,  I need to also upgrade server that is hosting internal page. Currently,  I have one Windows 2008r2 (standalone) no DR.
What would be yours recommendation for this sever, too?
I was thinking to setup 2 windows servers with MS IIS Load Balancer?

Please assist with this question\answers.

I downloaded sybaseOT and was able to install it. I vpn to the system then opened Sysbase Central , go to tools then connect.  I entered "sa" for user id and provided the password. However, I get :
could not connect to the database. the odbc driver manager could not find a data source.  I don't Sybase too much. Please help.

I have 900gb database running in sybase 12.5 and 10 testing database. I don't want to create 10 testing database with 900gb size.

So, I want to truncate all tables, and reduce the database size to 50gb, take backup as 50gb dmp and load it in 10  testing database.

Is it possible to do this, if no, please advice how can I achieve this.

Hello Experts,

I am trying to update a table and set a value equal to another value where some IDs match.

Store Number      Product Number      BOHMax
1                                    100                              52
1                                    101                               0
2                                    100                              37
2                                    102                              0
3                                    100                              46
3                                    101                              0

I want to update this table and set the BOHMax for Product 101 equal to the BOHMax of Product 100 where they are in the same store.

UPDATE storeprices SET bohmax = (SELECT bohmax FROM storeprices WHERE storenum = store)?

Something like that....
I so often hear "There is no use case with us that supports in-memory HANA database for our applications. As HANA is useful for only data warehousing (OLAP) applications like SAP BW and not for OLTP applications"

People who work in Oracle database know that 95% of times issues encountered in production are Database performance related. i.e. oracle database becomes slow due to innumerable reasons like non-usage of index, corrupt index, incorrect partitioning etc.. HANA does not need such performance tuning as it does not need indexes.

Thus why is SAP HANA said to be useful only for Data warehousing (OLAP) when all transaction processing OLTP applications can immensely benifit from HANA?
I have a very large range partitioned table in ASE 15.7. I would like to migrate this table to a new empty copy. The extraction from the old table will perform various calculations and manipulations, but for simplicity let’s just use “*”.

The simple way isn’t going to be fast enough…
(and  bcp ain’t going to cut it either.)

I’ve experimented with multiple sessions, each addressing just one partition on the source side (the partition key column has an appropriate index)…
INSERT NewTable SELECT * FROM OldTable WHERE (confine selection to partition N)

But the problem is that all but one session remains in “lock sleep”. Sybase doesn’t deal with targeting partitions the way that Oracle can (at least I don’t think it can), so I can’t seem to get any concurrency across sessions. With Oracle, I would prepare/populate partitions concurrently, and then append them together into a final table.

Any strategy suggestions to explore?

We have requirement data extract from sybase and db2 system and combine them and create a un editable document and present on b2b site . Need cheap solution
I've been learning about in-memory computing (both Oracle and SAP Hana) and this is looking like a major revolution, no ? Making the architecture of the 90's a relic of the past ? Just trying to understand.

In this SAP presentation (first 5 minutes), Prof. Hasso Plattner talks about the revolution that is Hana. Because it's an in-memory database, performance is fast as lightning, thus opening up many possibilities because of the speed. Attached is Hana's .pdf
After researching this a bit (including Oracle, here), I can see the value of in-memory computing: faster, reduces complexity, reduces data footprint, etc.

Prof Plattner also talks about eliminating OLAP databases (and data warehouses, which I suppose is OLAP), because of the speed. So is this true too ? He says to bring analysis back to the OLTP system. I also heard Hana can scan 2 B records per second . . . if so, wow.

So I'm old school Oracle, came at the beginning of client server, three-tiered, etc. with a little COBOL thrown in back in the day. Can write awesome SQL statements and did plenty of PL*SQL programming, and lots of performance tuning. But it's looking to me like this is a new world and I better get a handle on it.

We have a small d.b. so size is not even a consideration. Like 60,000 main master records (students in a …
I'm having trouble fixing the syntax in this statement:
 SELECT Administrator_VhStock.[NO], Val(Right([BR],1)) AS BR2, IIf(Administrator_VhStock.Usage="D","D",IIf(Administrator_VhStock.Usage="L","L",IIf(Administrator_VhStock.Usage="G","S",IIf(Administrator_VhStock.Usage="O","H",IIf(Administrator_VhStock.Rental_Status="R","R",IIf(Administrator_VhStock.SALESDATE Is Not Null,"V",IIf(Administrator_VhStock.STOCK_STATUS="P","O","I"))))))) AS STAT
 FROM Administrator.VhStock
 WHERE NO = varStockNo

error [Sybase][ODBC Driver][SQL Anywhere]Syntax error near '=' on line 1
I'm pretty sure its a syntax issue related to sybase

I am trying to shrink the database size while taking dump so I can load the dump in smaller size database. I guess it is not possible in sybase 12.5. So I am trying to extract only the table structure and load just the table structure into smaller size database so I can use it for simple testings. My objective is NOT to use same size database for my testing purposes.

Please let me know if it possible and if possible I am looking command to extract only table structure and command to load it in smaller size database.

What was the logic of SAP buying Sybase for $5.8 billion when SAP was building SAP HANA from the grounds up as a contender for all other databases especially Oracle and Sql Server.

It would have been much cheaper to hire talent and build SAP HANA from the grounds up than having to acquire Sybase and build HANA side by side.

What is the roadmap for Sybase. Will HANA take over Sybase?
I have  a table like this

I want to display the comma separated email values in separate rows. How can we do this in Sybase in a query?

Any ideas please.

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