1,302 questions
0
votes
1
answer
56
views
Sybase ASE avoid permission issues
I want to query multiple tables across databases, something like:
declare @sql varchar(100)
select @sql = 'select * from mydb1..mytable'
select @sql = 'select * from mydb2..mytable'
exec(@sql)
...
0
votes
0
answers
63
views
How to extract the value from output of sybase sp_helpdb
I want to extract the status of a database. How can I do this using a Python script?
I tried to write a simple Python script, but it did not produce the desired output.
My requirement is to extract ...
0
votes
1
answer
52
views
SAP Sybase ASE ODBC driver: specify a user for connection and a different user for database (on Windows)
Sybase SQL syntax for accessing tables is <user>.<table>. I am using the ASE ODBC driver to connect Excel to an old on-premise installation of Sybase, which requires a logon username to ...
2
votes
1
answer
48
views
Sybase ASE deallocate cursor if it exists
Say I have
declare c cursor for select * from table
If I ran the above twice, it would fail with
There is already another cursor with the name 'c' at the nesting level '<pointer>'
I can ...
1
vote
0
answers
62
views
Analytic functions not running in Sybase
I am very new to Sybase ASE (my first time actually after moving from the Oracle & Snowflake).
My question : Does Sybase allow any analytic function (RANK, ROW_NUMBER, SUM() OVER etc.)?
I am ...
2
votes
1
answer
83
views
Sybase - How to use "ORDER BY" in derived table
After a while I'm again asking for help, as I couldn't think of solution.
I have this SQL query:
SELECT * FROM (SELECT TOP 1
ac_registr,
event,
CASE
WHEN dimension = "C" THEN "Cycles&...
2
votes
0
answers
138
views
Clarification of converting Implicit outer joins to ANSI joins [duplicate]
As part of the modernization effort (move from Sybase ASE to SQL Server), we are removing old implicit join operators and rewriting SQL using ANSI join style.
When running both queries, I saw that my ...
2
votes
1
answer
144
views
sybase merge query with where clause in insert or skip the insert on condition
I have a table with account_number, amount , last_updated_time.
I wrote a merge query as below
MERGE INTO account AS target
USING (SELECT ?,?,?)
AS SRC(account_number, amount , last_updated_time)
ON ...
1
vote
1
answer
69
views
TRUNCATE TABLE PARTITION takes hours when deleting an empty partition on Sybase ASE 16
We are having a performance issue with our sybase ASE database version 16.0.03.11.
The TRUNCATE TABLE x PARTITION y runs for hours although the actual partition has 0 records.
How does the truncate ...
0
votes
1
answer
104
views
The type initializer for 'Sybase.Data.AseClient1.AseConnection' threw an exception when running in IIS
I am getting the following error in one of my C# ASP.NET MVC applications:
The type initializer for 'Sybase.Data.AseClient1.AseConnection' threw an exception
Notice that it says AseClient1 and not ...
2
votes
2
answers
323
views
Return a column with more than 16384 bytes
I am using a sybase ase 15 database. And I have a column of type image (this column stores SQL querys) so I have to convert it to varchar to return the text. The problem is that I can't return more ...
2
votes
0
answers
43
views
How to Retrieve Key Performance Metrics from SAP ASE / Sybase Instances?
I want to fetch important performance metrics from SAP ASE/Sybase databases. These include:
Percent of lock used
Percent of active connections
Heap Memory Utilization %
Memory Utilization %
Disk ...
2
votes
2
answers
153
views
Rank function in Sybase ASE to get the top n from each group
I referred to this question
I am trying to get the top 5 sequence of each id.
I am using Sybase Ase 16.0 and i believe Rank/Partition is not supported
My expected output is something like
id sequence
-...
1
vote
2
answers
699
views
Sybase client install fails on Red Hat linux
I have downloaded the SDK for Adaptive Server Enterprise - Linux on x86_64 64bit (sybase version 16.0)
After uploading to a Red Hat Linux machine, RHEL 7.5
Running the install, the installer exits ...
-1
votes
4
answers
140
views
sybase sql: choose records for which sum of values in column XYZ equals some specific value - applied to subsets
Using Sybase SQL (DBMS: Adaptive Server Enterprise/16.0.), I want to find the records fulffilling certain simple requirements (such as DEBITCREDIT == 'D') AND the following requirement: the sum of the ...
0
votes
0
answers
234
views
Improve performance query on SYBASE ASE
I hope you could help me on the following problem. I have the below query which is taking too munch time (hours) and it is eating all the resources available ( currently I have 2 engines of sybase ase ...
0
votes
1
answer
7k
views
How can I query ASE Sybase database to get all users with creation date and assigned roles?
Can someone please help me to get list of all users, created date and assigned roles to users in Sybase database? I tried all ways but no luck.
Thank you.
I tried to find in syslogins and sp_display ...
0
votes
0
answers
180
views
Looking for a sql command to find active triggers, and their associated tables
I am trying to find active triggers and their associated tables in Sybase. What would be a written query?
I found the following SQL command useful
select * from sysobjects where type = "TR"...
0
votes
0
answers
99
views
Deleted a row in sysobjects in sybase
I was querying tables in sysobjects when I accidentally pressed "D", triggering the delete row option in the results pane. For some reason, I can still query the table using the select ...
1
vote
0
answers
344
views
How to explicit execute begin (commit, rollback) transaction with PlatformTransactionManager?
I'm using Spring PlatformTransactionManager with jTds and Sybase ASE 16.
I cannot use AutoCommit because it will SET CHAINED ON and the database I'm working has triggers with unchained procedures.
So ...
0
votes
1
answer
1k
views
How do I select current database name and all the schema for the database name in SYBASE ASE using a query
How do I select current database name and all the schema for the database name in SYBASE ASE using a query
tried Select db_name
gives invalid column name
1
vote
1
answer
371
views
Connecting to sybase ase with specific charset from a software
I need to connect a Sybase ASE database with a specific charset. I have data with a charset that cannot be read properly by the default charset of Sybase ASE. I know how to connect with "isqln -J&...
1
vote
0
answers
302
views
SQL Conditional Update having error [2601][23000]
I have tried to change the customerID number for the sales table but constantly facing constraints issues.
UPDATE sales
set s.customerId = '15'
from sales s
where s.customerId = '28'
and s....
4
votes
0
answers
509
views
Sybase/SAP ASE T-SQL: Why ltrim() and rtrim() native functions return null when evaluaten for empty and only-spaces strings?
I noted an (for me) unexpected behavior on ltrim() and rtrim() functions on Sybase ASE T-SQL engines. The weird behavior I observed occurs on ltrim() and rtrim() functions for empty and only-spaces ...
0
votes
0
answers
131
views
Connecting NiFi with Sybase database erroring
Could you please help me with the correct URL format to connect to Sybase using the DBCP connection pool of NiFi?
The URL format that I have tried is - jdbc:sybase:Tds://host:port
I keep getting this ...