sybase-ase

How can I get data from a stored procedure into a temp table?

怎甘沉沦 提交于 2019-12-18 02:46:00
问题 Am working on sybase ASE 15. Looking for something like this Select * into #tmp exec my_stp; my_stp returns 10 data rows with two columns in each row. 回答1: In ASE 15 I believe you can use functions, but they're not going to help with multirow datasets. If your stored proc is returning data with a "select col1,col2 from somewhere" then there's no way of grabbing that data, it just flows back to the client. What you can do is insert the data directly into the temp table. This can be a little

From a Sybase Database, how I can get table description ( field names and types)?

早过忘川 提交于 2019-12-17 17:28:53
问题 I have access to command line isql and I like to get Meta-Data of all the tables of a given database, possibly in a formatted file. How I can achieve that? Thanks. 回答1: Check sysobjects and syscolumns tables. Here is a diagram of Sybase system tables. List of all user tables: SELECT * FROM sysobjects WHERE type = 'U' You can change 'U' to other objects: C – computed column D – default F – SQLJ function L – log N – partition condition P – Transact-SQL or SQLJ procedure PR – prepare objects

weird phenomena during deadlocks involving IMAGE or TEXT columns

你说的曾经没有我的故事 提交于 2019-12-14 04:05:44
问题 This is something very disturbing I stumbled upon while stress-testing an application using Sybase ASE 15.7. We have the following table: CREATE TABLE foo ( i INT NOT NULL, blob IMAGE ); ALTER TABLE foo ADD PRIMARY KEY (i); The table has, even before starting the test, a single row with some data in the IMAGE column. No rows are either deleted or inserted during the test. So the table always contains a single row. Column blob is only updated (in transaction T1 below) to some value (not NULL).

SSMS connection to Sybase ASE

喜欢而已 提交于 2019-12-13 13:18:00
问题 Is there a way to connect to a Sybase (ASE) database instance using Sql Server Management Studio 2008? I tried using other tools to connect but they are very limited and would like to use SSMS. 回答1: You can use this tool: SqlDbx It's great. 回答2: As far as i know there is no way to use Microsoft's Server Management Studio. And if you are honest it doesnt make a lot sense either. why should sybase/sap design their servers to work with an application provided from a competitor. personally i

Can a project use 2 different versions of the same dll? (Sybase.AdoNet 2 and 4)

偶尔善良 提交于 2019-12-13 05:25:00
问题 I am upgrading some old services. Some dlls it's using are referencing Sybase.AdoNet2.AseClient but new dlls that I am adding reference Sybase.AdoNet4.AseClient. I keep getting errors saying "Major version mismatch sybdrvado20.dll. Expecting major version '2'. Loaded version 1" and vis-versa. Does anyone know how I can resolve this issue? Is it just not possible for a project to reference dlls that expect different versions of a dll? Thanks, 回答1: Reference both assemblies and change the Alias

Are there more elegant ways of querying data based on values stored in attribute-value table?

强颜欢笑 提交于 2019-12-13 04:10:57
问题 I have an attribute-value table av that looks like this: | attribute | value | ~~~~~~~~~~~~~~~~~~~~~ | a1 | A1 | | b1 | BB1 | | b2 | BB2 | For simplicity, assume varchar(255) on both attribute and value columns, unique index on attribute . I need to use the values of specific attributes in a query, which looks like this: SELECT * FROM t1 ,t2 WHERE t1.a1 = "A1" -- Value of "a1" attribute AND t1.id = t2.id AND t2.b1 = "BB1" -- Value of "b1" attribute AND t2.b2 = "BB2" -- Value of "b2" attribute

Why does the connection to ASE fail when password encryption is required?

本秂侑毒 提交于 2019-12-13 02:23:17
问题 How can I password encrypt the database server connections from PHP to Sybase ASE? The PHP connection to ASE fails when net password encryption reqd = 1 . How can we make a PHP DB connection to ASE with password encryption? Is there a PHP keyword or parameter that we need to set on the client side connection? 回答1: Below is a solution to this problem in term of able to connect from a Linux 64 bit base machine with PHP version 5.3.6 and Sybase driver from Sybase CTISQL Utility/15.7/P-EBF19975

Autonomous transactions in Sybase ASE 15.5

主宰稳场 提交于 2019-12-12 06:57:01
问题 I'm working on Oracle to Sybase ASE SPs conversion and trapped into the autonomous transaction usage in PL/SQL. Could you please let me know if there is any equivalent for this feature in Sybase Adaptive Server Enterprise? May be there are some relevant posts with the description of the solution for this problem? Thank you in advance. 回答1: Never mind. I've managed to find the solution myself. To whom it may be interested: The idea of the solution has been taken from the SQL Server external

Escape double quote in sybase

守給你的承諾、 提交于 2019-12-12 03:56:46
问题 I am running a query on a database to retrieve records in a CSV (with quotes) format: "Data","More data","some "funny" data with quotes","more" . Now when this is parsed, there is an obvious problem with this bit: ...,"some "funny" data with quotes",... Is there a way to "escape" these quotes in sybase to save me post-processing? 回答1: if it's just double-quote you want to select in a literal string, use single quote as the string's delimiter. Try select '"' and you'll see 回答2: --after you

Sybase ASE is terminating this process. Connection died while writing to socket

橙三吉。 提交于 2019-12-12 03:32:54
问题 In Sybase, we are intermittent exception like System.Data.OleDb.OleDbException (0x80004005): [08S01] [ASEOLEDB]ASE is terminating this process. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForMultpleResults(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior