sybase

What are the implications of having out of date table statistics on a Sybase/SQLServer database?

For example, for heavily used tables with volumes in the order of 10 million rows that grow by a million rows a month, if the stats are 6-8 months old how detrimental to the performance of the database is this going to be? How often should you be refreshing the stats? ...

User DSN & System DSN - How to choose System???

Scenario: Our install package used to add User DSN. We changed this to install System DSNs due to Terminal Servers and Citrix. The problem is that some of these old User DSNs are floating around, and our application automatically chooses the User before the System and the connection info has changed as we upgraded server software. I g...

Check if a column is auto incremented in Sybase with JDBC

To check if a column is auto incremented i can do the following Connection con = ... DatabaseMetaData meta = con.getMetaData(); ResultSet metaCols = meta.getColumns(catalog, schema, table, "%"); while ( metaCols.next() ) String value = rs.getString("IS_AUTOINCREMENT") ... works fine except with Sybase databases. I've...

Best practices for multithreaded processing of database records

I have a single process that queries a table for records where PROCESS_IND = 'N', does some processing, and then updates the PROCESS_IND to 'Y'. I'd like to allow for multiple instances of this process to run, but don't know what the best practices are for avoiding concurrency problems. Where should I start? ...

Improving performance of Sql Delete

We have a query to remove some rows from the table based on an id field (primary key). It is a pretty straightforward query: delete all from OUR_TABLE where ID in (123, 345, ...) The problem is no.of ids can be huge (Eg. 70k), so the query takes a long time. Is there any way to optimize this? (We are using sybase - if that matters). ...

VS 2005 cannot view Sybase SPROCs?

Hi, Im using the VS2005 Table Adapter query wizard to design my datasets. However, I cannot see any SPROCS on my sybase database when selecting ' use existing stored procedure ' In the drop down supplied by the wizard it allows me to see all the functions that are in Sybase but not the SPROCS. Im logging also as DBA purely to see if ...

Querying results of a stored procedure

I have a stored procedure that returns a large number of results, and would like a better way to debug/ parse the results than copy/pasting into excel or whatever - is there a way to pass the results of the procedure into a query? e.g., if the procedure call was something like: exec database..proc 'arg1','arg2','arg3' my thought was ...

PRE ANSI-92 Left Join Syntax (Sybase)

What is the syntax to specify a Left Join using pre ANSI-92 syntax (i.e. *=) when part of the Where clause has an 'equal to some constant' condition ? (in this case 100 is the constant) Example: SELECT t1.ID, t.* FROM (select * from SybaseTable where ID=1) t, SqlServerTable t1 WHERE t1.ID *= 100 and t1.SeqNo *= t.SeqNo In this ca...

sybase sql way of converting seconds value to hours minutes and seconds

In sybase is there any built in functions to convert a seconds value into hours, minutes, and seconds? ...

Updating database tables when values are missing.

I have two tables : Bill : create table Bill( BillDate datetime, Amount decimal(10,2) , BillCurrency varchar(3) , ReportingCurrency decimal(10,2)) FxRate : create table FxRate( RateDate datetime, SourceCurrency varchar(3), Targ...

SSIS SQL Native Client Error - Can't Diagnose Cause

We have a very large number of SSIS jobs that are scheduled every evening/early morning to run in succession. These jobs populate and update large amounts of data for our production systems. Recently, we have begun receiving an error message on different jobs at different times. So far, it has been impossible to reproduce on a consistent...

SQL Dates Query - how long has this condition been true

The question is how long have these customers been jerks on any given date. I'm working against Sybase For this simplified table structure of table history_data table: history_of_jerkiness processing_date name is_jerk --------------- ----- ------- 20090101 Matt true 20090101 Bob false 20090101 Al...

SQL: filter on a combination of two column values

I have a table balances with the following columns: bank | account | date | amount I also have a table accounts that has bank and account as its composite primary key. I want to do a query like the following pseudocode: select date, sum(amount) as amount from balances where bank and account in (list of bank and account pairs) group...

Unit testing Tool for Sybase database

Do we have any tools to unit testing Sybase databases around? i am not able to find one in http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks i am looking out for a tool that can allow me to unit test Stored procedure.Something like wee do with utPLSQL.This tool will be used by Database guys to unit test. ...

how to access table across multiple data server

I have two Sysbase servers , server1 and server2 . I have a stored procedure declared and running on server1. In that SP i want to access table from server2. How can i do that? Also my both instances are running in a UNIX box ...

Suggestions for writing an nsapi plugin that calls sybase, that has to be threadsafe

I'm having a hell of a time trying to find sybase documentation that says if the 12.5 client is thread safe. I need to make sybase threadsafe calls because I'm writing an nsapi plugin which lives in a threaded environment. So either I need to make sure the sybase client can run in a threaded environment or I'd need to serialize calls to ...

ODBC Driver General error: attempted two active database requests

I'm using ASP.NET 2.0 to connect to a Sybase Sql Anywhere 5 server. And I get this error sporadically. It just happens sometimes. The error message is: ERROR [HY000] [Sybase][ODBC Driver]General error: attempted two active database requests Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] [Sybase][ODBC Driver]General e...

How to resolve Sybase table locks (VB6)?

I am not a great VB programmer, but I am tasked with maintaining/enhancing a VB6 desktop application that uses Sybase ASE as a back-end. This app has about 500 users. Recently, I added functionality to this application which performs an additional insert/update to a single row in the database, key field being transaction number and the...

Sybase to SQLserver linkserver errors

I have set up a SQL link server between an SQLserver 2005 on a W2003 R2 and a SYBASE 12.5.0.2 server on a IBM AIX H70 system. I use the Sybase ODBC driver 04.20.00.67 The problem is than most of the times (there is no pattern ) when I select rows from a Sybase table I get ONLY ONE ROW without any error. Please note that there is n...

Upgrading Informix - Switch to Oracle, Sybase or stay with Informix?

Hi, Previously I posted a question so I could confirm our current (albeit archaic) version of Informix here: http://stackoverflow.com/questions/682154/how-do-you-identify-informix-version-on-solaris (Thank you Jonathan and RET for clearing that up) We are definitely planning on upgrading but are first discussing if it would make more...