A range of RDBMS and BI products from Sybase Corporation, distantly related to MS SQL Server. Their RDBMS offerings span the full range from an enterprise-grade "big iron" RDBMS down to a lightweight mobile RDBMS. On the BI side, they have a DW/BI solution called Sybase IQ.

learn more… | top users | synonyms

78
votes
4answers
19k views

Why use both TRUNCATE and DROP?

In the system I work on there are a lot of stored procedures and SQL scripts that make use of temporary tables. After using these tables it's good practice to drop them. Many of my colleagues (almost ...
7
votes
4answers
10k views

How do I identify tables that have a foreign key to a specific table in Sybase?

I am looking for (preferably) an SQL statement that selects the table/and column names for any table with a foreign key to a given table in Sybase. I think it should be somehow possible with the ...
6
votes
2answers
2k views

When is a result returned deterministic and when not?

if you execute a statement like this: select first field1, field2 from exampleTable where field1 = '1'; then you get a warning like this: The result returned is non deterministic SQLCode=122 ...
6
votes
1answer
779 views

OLE DB Sybase Connection Failing

I have a connection to a Sybase database which we stage in a SQL Server 2008R2 database. I can connect the the database and the connection tests out fine. I am using an OLE DB source with a Sybase ...
5
votes
1answer
13k views

How to find the date a login password was last changed in SQL Server 2008?

I'm porting stored procedures from Sybase 15 to SQL Server 2008. In Sybase this statement calcs an expiration date by adding a number of days to syslogins.pwdate (Date the password was last changed) ...
5
votes
1answer
21k views

Split/explode comma delimited string field into SQL query

I have field id_list='1234,23,56,576,1231,567,122,87876,57553,1216' and I want to use it to search IN this field: SELECT * FROM table1 WHERE id IN (id_list) id is integer id_list is varchar/text ...
5
votes
1answer
569 views

Tuning queries and indexes using index analysis tool

I've been pointed to this script from several places which apparently helps with designing indexes in Microsoft SQL Server: http://indexanalysis.codeplex.com/ The problem is I'm using Sybase ASA 11, ...
4
votes
1answer
2k views

Foreign Key constraint on fixed value field

Note: I am a developer... I have an Asset table that has many codes that are foreign keys into a second table OutlineFiles. The OutlineFiles table has Type and Code as the primary key. The foreign ...
4
votes
1answer
18k views

sybase format datetime yyyymmdd

This seems like something trivial would be easy, but I couldn't find a good way to do it. This is what I came up with: select convert(numeric, (select ...
4
votes
1answer
126 views

Which Disk a Device Lives on?

I would like to know which Disk a database device is being stored. When I use "format" command in SCO Unix command line, it shows that the system has two disks (Disk 0 and Disk 1). They are: 0. ...
4
votes
2answers
2k views

Returning the max of a column

Table: SubSection | TradingId | Year | Amount 100A 5001 2004 -120 200B 5001 2005 -130 300C 5002 2006 -140 300C 5003 2007 -150 I ...
4
votes
1answer
965 views

How to make iSQL/FreeTDS behave like a normal client?

I have a third-party Sybase database, which my users would like to connect to and query from a Linux box, using iSQL. I have installed UnixODBC and FreeTDS. As it is third-party database however, I am ...
4
votes
1answer
989 views

Is there a -w equivalent for isql when already connected?

The default output (text) width in sybase isql is 80. It can be changed with the -w flag when isql is started on a command line: isql -w 200 -S... -U... -P... Now, I am wondering if there is a ...
3
votes
3answers
4k views

Best way to work around NOT IN NULL issue?

There are plenty of explanations of why NOT IN NULL doesn't work, but I didn't see any solutions. (recent question here: Why does NOT IN with a set containing NULL always return FALSE/NULL?) I have 6 ...
3
votes
2answers
245 views

What's the best way to get data for sampling points within a timeframe

I'm looking for some advicse, how to setup a set of queries, which are checking for a aggregated value for sampling points within a time period. This should run at an IQ-server, so maybe not this many ...
3
votes
1answer
664 views

How are foreign keys resolved when creating tables in batch?

I am creating a database version management tool with the goal of being able to recreate a database from scratch using text/sql files contained in source control. As part of establishing a baseline ...
3
votes
1answer
406 views

Backup & recovery strategies for Partitioned Database in Sybase ASE

I need to know about backup & recovery strategies for partitioned Database in Sybase ASE 15.7 . I am not worried about transaction failure & recovery scenarios. We have already faced this 2 ...
3
votes
1answer
105 views

Are database backups specific to the OS on which they are created?

I am trying to get a better understanding of the behaviors of database backups for Sybase (15.X) and Oracle (11.x) as it relates to the underlying OS. Is the backup file OS specific or can it be ...
3
votes
1answer
199 views

Keep Getting I/O Error Reading Sybase Tables

I keep getting the following error message from my Sybase server: I/O error detected during read for BUF pointer = '0xed318720', MASS pointer = '0xed318720', (Buf#: '0'), page ptr = '0xecdbe000', ...
3
votes
1answer
5k views

update statement with self join

I needed to copy information from one row of a table to another. I noticed I could do the following: update address set col1 = a2.col1, col2 = a2.col2, .....etc from address a1, address a2 where ...
3
votes
1answer
3k views

Alter table modify column on a huge table containing more than 25 million records

I want to modify a column on a huge table containing more than 25 million records. I am using sybase 12.5.4. I have read through these posts What is the most efficient way to alter a column ...
3
votes
0answers
107 views

Options to migrate large database from Sybase ASE to SQL Server with minimum downtime

The problem: Our server database contains 1TB of data. It runs on a Sybase ASE 15.7 server and shall be migrated to SQL Server 2014. The servers will be located in the same data center during ...
2
votes
3answers
779 views

Refactoring Series of UNIONs in single table (SQL/SYBASE)

I am trying to query a database and reformat the rows/columns that I am interested in. Each row in the current table (EQ) represents a field in a form. In reality, there are several hundred FieldNum ...
2
votes
1answer
1k views

View with parameters in Sybase SQL Anywhere

A view with Sybase engine cannot take parameters. Is there a way to do this?
2
votes
2answers
13k views

What Query Browser tools are out there available for Sybase Database? [closed]

What are the free and commercial tools available for Sybase Database?
2
votes
1answer
3k views

Load database from Solaris (Sybase 15.0.3) to VMWare Solaris (Sybase 15.7.0)

I need to perform a load of a Sybase (15.0.3) Database from a Sun Solaris 5.10 environment (on sparc architecture) to Sybase (15.7.0) on Solaris 10 (on i86pc architecture) running on my vmware ...
2
votes
2answers
1k views

SQL Joins Order of Operations

I'm new to SQL but happen to be dealing with a couple of rather larger table (on the order of a billion rows each). I want to do an inner join like the following: SELECT * FROM XTABLE X INNER ...
2
votes
3answers
11k views

How can I pass parameters to an “SQL Script” from isql

I am wondering if it is possible to pass parameters to an SQL script from within sybase's isql utility. For example, I'd like to store a select statement in the file the_script.sql that would look ...
2
votes
1answer
40 views

How to use the below expression in my SQL Query

I have this expression for sorting. I need to use this expression in my SQL code for the sorting purpose. Can anyone help me with this?? I tried case when stmt but it fails. Expression: if ([All ...
2
votes
1answer
292 views

Load sybase .db into new sybase developer server

We've got a few .db files laying around here which were created by Sybase (version 8.x, I guess) and I've the task to extract some data from those old databases. Now I've installed the latest Sybase ...
2
votes
1answer
2k views

Tracing/Logging of Sybase ASA

Trying to get logging/tracing of Sybase 9.0.2.3396 (Adaptive Server Anywhere). I wish to log all the SQL executed against the database. I tried RIBO and while I got it "working," I never saw anything ...
2
votes
1answer
2k views

How to traverse a tree in SQL? Sybase edition [duplicate]

Possible Duplicate: Traversing tree-like data in a relational database using SQL Whats the best way to traverse a tree in sybase? Basically, what I want is to gather all the decedents of a ...
2
votes
1answer
59 views

MobiLink: How to propagade schema change for a synch profile to remote databases

Once an application is online with a synchronisation profile it might happen, that the profile needs to be changed. E.g. a new index is introduced, columns are added etc. Having the synchronisation ...
2
votes
1answer
153 views

Easiest method to retrieve the content of BLOBs from a Sybase databse

I would like know the easiest way (no coding) to extract the content of the blobs of a database. For example, I have a table which contains a column whose format is BLOB. The result I would like to ...
2
votes
4answers
11k views

Search every column in every table in Sybase Database

I'm been taxed with the task of creating an application that pulls data from our Micros Point of Sales system. The POS is using a Sybase database running on one of our servers. The database schema is ...
2
votes
1answer
595 views

How compatible are Sybase and SQL Server clients connecting to the alternate back end?

Given the shared history of the Sybase and SQL Server products, and their use of a similar (identical?) wire protocol in TDS, what definite statements can be made, if any, about cross compatibility. ...
2
votes
1answer
42 views

bulk copy out huge table on sybase adaptive server

anyone has a good approach or even strategy to bulk copy out single table with 500+ millions rows. the table encountered unitialized logical page, and we are looking to atleast salvage good records. ...
2
votes
1answer
1k views

How to configure connection accessing Sybase Anywhere from Sybase IQ via ODBC on Linux

I'm trying to access an ASA16 server from IQ16 via ODBC driver. Both servers are installed on the same Linux box. I've installed unixodbc-bin and added a file .odbc.init into home of user running ...
2
votes
0answers
115 views

How to calculate the ratio insert/select against a table to manage the index in Sybase ASE?

To create/manage indexes of a table, it is important to know the ratio insert/select or modification/reporting. For instance, if there are more INSERTS than SELECT against a table, we should try to ...
2
votes
1answer
3k views

Sybase SQL - Truncation error occurred. Command has been aborted and find CACHE QUALITY

Need help with below code, as it fails with truncation error Truncation error occurred. Command has been aborted. create table monCacheQuality ( ServerName sysname ...
1
vote
2answers
2k views

How can I migrate a sybase database to mysql? [closed]

I've been tasked with migrating a fairly complex legacy Sybase database into a MySQL database and I have no idea where to start. I can't use any off the shelf software, so I'm going to have to write ...
1
vote
1answer
3k views

query for COLUMN_NAME LIKE “X” in sybase(Transact SQL)?

I need to automate writing a query in Sybase. The table looks like this: ID, A1, A2, A3, ..., A24, B1, B2, B3, ..., B24, etc. I would like a query where the user can choose which columns are ...
1
vote
3answers
11k views

How to import Sybase .db file into SQL Server database?

I've been given a Sybase .db file by a client and I need to import that into a new SQL Server database so that I may see the data as well as the tables and their relationships, any ideas on how that ...
1
vote
1answer
958 views

In Sybase, what can I do to figure out why my Transaction Log is filling up?

We have a process that runs each morning to load about 40,000 rows from one server to another. In the past few weeks, the process has been having a 'log suspend' once or twice a week. This is ...
1
vote
1answer
8k views

Error when load db dump (cross platform)

After a Sybase (15.0.3) compress dump a database on the original platform - Solaris Sparc 64 - with all the required steps (even the quiesce step), I have tried to load it on my Sybase (15.7) Solaris ...
1
vote
2answers
2k views

Sybase - How to get logsegments off my data devices?

I'm running Sybase ASE 15.7 and coming up to speed to clean up a database server installed by a non-DBA. I have a database that has the following device configuration: I want to have data1 and ...
1
vote
2answers
2k views

Is there a way to find out how many times a stored procedure was invoked since last DB start

I am currently in a fairly mismanaged environment, where stored procs were introduced to the database over a few years and some versions became obsolete. Is there an easy way to figure out (preferably ...
1
vote
1answer
722 views

Does fast bcp replicate in sybase sql statement replication?

Is it possible to replicate fast bcp using sql statement replication in sybase?
1
vote
2answers
5k views

Sybase ASE 15 “reorg rebuild” fixes performance issues - why and how to tell when it's needed?

I had a table of several million rows in a Sybase ASE 15 server which was running extremely slow, even basic queries would take 5 minutes to execute, for example: SELECT COUNT(1) FROM TABLENAME; ...
1
vote
1answer
60 views

Sybase 12 to behave like Oracle and SQL Server 2014 - non blocking transaction read

We utilize an ODBC connection so our code can access various databases - namely Oracle, Sybase 12 and SQL Server 2014. NOTE : We have a table called which we use for locks. This table only ever has ...