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

61
votes
4answers
10k 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 ...
6
votes
3answers
6k 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
1k 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
312 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
6k 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
419 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
8k 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 ...
4
votes
1answer
1k 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
2answers
587 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
3answers
210 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 ...
4
votes
1answer
759 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 ...
3
votes
3answers
2k 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
148 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
299 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
97 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
2k 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
1answer
2k 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
502 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 ...
2
votes
3answers
532 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
2answers
6k views

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

What are the free and commercial tools available for Sybase Database?
2
votes
1answer
721 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
1answer
1k 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
1answer
9k 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 ...
2
votes
2answers
571 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
1answer
192 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
1k 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
1k 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
334 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
0answers
94 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
1k 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 ...
2
votes
4answers
5k 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 ...
1
vote
2answers
1k 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
2k 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
6k 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
582 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
6k 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
960 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
1k 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
477 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
3k 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
3answers
6k 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 ...
1
vote
1answer
50 views

SQLAnywhere: Visualize in real time CPU and RAM consumption of sql connections

I want to keep track of which connection use most of resources. Within Sybase Central (SQL Anywhere 9, 12), for each server and database, we have pane to check in real time All Connected Users and ...
1
vote
1answer
181 views

How does Sybase store datatime information?

We have a Sybase database that currently stores datetime values in some of the tables. If we move that server with the Sybase database to another country which is in another time zone, will the ...
1
vote
1answer
10 views

SQLRemote: Implicit synch of connected objects

I'm looking for the best way to synchronise foreign key relations with SQLRemote. So having e.g. this two tables CREATE TABLE table1( id integer not null default autoincrement, name ...
1
vote
1answer
72 views

Date and Time in Log file

I've the translated Sybase ASA 9 log file, and the log looks like --UPDATE-1120-05402698411 UPDATE DBA.titulo_receber SET dt_pagto='2014/apr/28 11:06:08.593', id_situacao='BA', ...
1
vote
1answer
458 views

How to get list of tables, views etc. a users has rights to on Sybase IQ?

I'm looking for a way to get a list of views, tables, procesdures etc, a user has been granted to. A select onto SYSROLEGRANTS helped me to find basic role of users -- but not more like this. So ...
1
vote
1answer
91 views

Sybase ASE 12 question

I support a database that has many tables that hold very similar data. Over time, much of this data isn't needed, and the table names are dynamic as an application is creating these tables, and the ...
1
vote
1answer
564 views

How to know spid which is filling tempdb from temp table name in sybase

I received alert that tempdb is going to be full and temp table name aslo provided. Now I want to know how to check which spid is filling tempdb from temp tablename.
1
vote
1answer
328 views

Sybase Databse Migration from 11.5 to 15

I have to migrate the Sybase Database from 11.5 version to 15. I would like to know few things mentioned below - i) What are the neccessary steps i need to follow in this migration. ii) What are the ...
1
vote
1answer
332 views

Whether it means the end time of the SYBASE LICENSE?

I want to know the meaning of "2013.03010/permanent/0C94 6187 B194 DF07", Whether it means the end time of the SYBASE LICENSE? sybase log 00:00000:00016:2011/01/03 14:15:37.02 kernel SySAM: ...