Sybase Database

Sybase, a subsidiary of SAP, builds a client/server relational database management system. Products include Adaptive Server Enterprise (ASE), Adaptive Server Anywhere (ASA), Sybase Unwired Platform (SUP) for mobile applications, Afaria for enterprise mobile device management and IQ for data warehouse and big data applications.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi,
I would like to know if there is any configuration parameter or procedure from which I could know how many CPUs or cores is used by ASE?
I am using Sybase ASE 16.0 & 15.7.
0
Want Experts Exchange at your fingertips?
LVL 9
Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Hi,
Is there any way to disable automatic truncating some of monitoring tables (monSysSQLText, monSysStatement) after SELECT operation? It will make my work a lot easier. I found only a note that ASE assumes that DB user don't want to see it again, which is not true in my case.
I am using Sybase ASE 16.0 & 15.7.
0
I can add a column to a table as follows. Is there a way to specify that the column can not be null?
Or am I already doing that implicitly.

My Sybase sql which works :
ALTER TABLE dbo.MaxPlayer ADD SmallScore tinyint DEFAULT  0


This does not work as I added NOT NULL:

ALTER TABLE dbo.MaxPlayer ADD SmallScore tinyint NOT NULL DEFAULT  0
0
I need to create a new column in a Sybase data table, but only if the column does not yet exists. Here is my query, below. My table is named BALANCE and the new column is named SAMP

When I run the query I keep getting an error message "Incorrect Syntax near bit". Can someone tell me what is wrong with my syntax. I know I am close, but I just can't figure it out.

if not exists (select 1 from syscolumns where object_name(id) = 'BALANCE' and name = 'SAMP')
begin
execute('

 alter table BALANCE add column SAMP bit DEFAULT (0) NOT NULL

')
0
I have the following Sybase sql code that is within a stored procedure. When the code executes, an error message is dislpayed 2627 - "Violation of PRIMARY KEY constraint BUKO_PRIMARY". I don't actually have access to the data, so I have limited debugging capabilities right now. However I think that the error is occurring because of maybe an attempt to insert a duplicate record into the table stored in @BakName. Does that sound correct? How should I handle this in Sybase sql to deal with the attempt to insert a duplicate record?
Also does the command "INDEX" attempt to make a column as a unique value in the column?

SELECT queryString = 'SELECT b.* INTO ' + @BakName +
                       'FROM stageTable a (INDEX stageTable_pk) +
                       ' INNER JOIN ' + @PrxyName + 'b (INDEX BUKO_PRIMARY) ON a.ATO_ID = b.TO_ID '
0
I am using DBArtisan 9.1.2 and I want to recompile a Sybase stored procedure that exists because I have to modify the stored procedure. How would I do so?

The stored procedure starts out as ...

create procedure dbo.usp_CalculateImportedItems
as
declare @err                  int
BEGIN
declare @BalanceRecordCount int
declare @PendingRecordCount int
declare @WiredRecordCount int
declare @OpenItemsRecordCount int
declare @IntellimatchRecordCount int
declare @AutoImportDate datetime
declare @ManualImportDate datetime

BEGIN  TRANSACTION
0
Hi,
I'd like to update automatically the statistics for single table in SYBASE ASE every 3 days.

If anybody had tried updating automatically the statistics for single table in SYBASE, please share the procedure with me.

Thanks in advance!
0
I had this question after viewing how to automatically retrieve datawindow while the user types the matching char string on sle.

I want to have the user retrieve automatically names from the list by keying letters in a search sle.
I set up the code to filter the data but nothing is happening. I tried the pbm_dwnkey as event id but nothing. I cannot find the pbm_upkey in the event list. I am using PB 12.5.
Thanks
0
hi
i am comparing the output of number of view from syscomments for specific tablename with sp_depends tablename output. i always get few extra views in syscomment output. is it correct way of comparing and why we get extra output from syscomments output.

1. select distinct sysobjects.name,
case
 when sysibjects.type = 'v'
..
  from sysobjects inner join syscomments on
sysobjects.id = syscomments.id
where syscomment.text like'%tablename'

2. sp_depends '%tablename%'

i am comparing above 2 output and find there is diffetence output..
0
Hi,

I'm working in the DATA WAREHOUSE PROJECT, Does anyone have the industry best practices on how to build a  TEST cases.

Such as Tools, Technique, the methodology used?
0
Will your db performance match your db growth?
LVL 2
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

UNABLE TO CONVERT THE DLI_MAIN_CODE AND | CHAR

--SQL================================
CREATE TABLE #PROOF
(
    dli_barcode numeric NOT NULL,
    all_dli_main_code varchar(10) NOT NULL
)

DECLARE cur CURSOR for
    SELECT
       
        U.DLI_BARCODE,
        U.DLI_MAIN_CODE
        FROM OMPROD..PS_DLI_ITEM_UC U, #AD_DAILY_REPORT D
        WHERE U.DLI_MAIN_CODE IN  (7,8,89)
        AND U.DLI_BARCODE = D.CHILD_BARCODE
        AND U.SETID = D.SETID
         


DECLARE @curDLI_BARCODE NUMERIC
DECLARE @lastDLI_BARCODE NUMERIC
DECLARE @curDLI_MAIN_CODE varchar(30)
DECLARE @DLI_MAIN_CODE SMALLINT

OPEN cur
FETCH NEXT FROM cur INTO
      @curDLI_BARCODE, @curDLI_MAIN_CODE
SET @lastDLI_BARCODE = @curDLI_BARCODE
WHILE @@FETCH_STATUS = 0
BEGIN
    IF (@lastDLI_BARCODE != @curDLI_BARCODE)
    BEGIN
        INSERT INTO #PROOF(dli_barcode ,all_dli_main_code)
            VALUES(@lastDLI_BARCODE, @DLI_MAIN_CODE )    --<<<<+ '| '
        SET @lastDLI_BARCODE = @curDLI_BARCODE
        SET @DLI_MAIN_CODE = NULL
    END

    IF (@DLI_MAIN_CODE IS NULL)
        SET @DLI_MAIN_CODE = @curDLI_MAIN_CODE
    ELSE
        SET @DLI_MAIN_CODE = CONVERT(VARCHAR(10), @DLI_MAIN_CODE + N' '+ '| ' + @curDLI_MAIN_CODE) --<<<<20170428 PM

    FETCH NEXT FROM cur INTO
        @curDLI_BARCODE, @curDLI_MAIN_CODE
END

IF (@DLI_MAIN_CODE IS NOT NULL)
BEGIN
    INSERT INTO #PROOF(dli_barcode, all_dli_main_code)
        VALUES(@curDLI_BARCODE, CONVERT(VARCHAR(10), …
0
I had this question after viewing Backing up Sybase database Server using Veeam.

Hi,

I'm new in experts-exchange community. My company is on the way to use SAP Solutions. Right now I must choose backup concept for all VM's and databases. As far I know HANA backs up relatively automatic (dumps database and logs from RAM to storage). The issue what keeps me not sleeping is backup from Sybase ver. 11 databases, as database shouldn't be stopped at any time (24/7 availabilty) and this version have no support for VSS. I've readed that it's possible to HA (High Availabilty) and DR (Disaster Restore) only with VMWare solutions but I'm not sure - will consistency of database not be corrupted?...
Can someone give me a Tip what would be the best solution?
Database: Sybase 11
VMWare: vSphere 5.5
Veeam: 9.5.0.823
Many thanks for Your replies.
0
FromDateTime DATE;
   ToDateTime DATE;  
   S_DATE DATE;
   
     S_DATE:=TRUNC(NVL(D_DATE,SYSDATE));

   IF flag='1' THEN
   FromDateTime :=TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') ;
   ToDateTime := TO_DATE(TO_CHAR(s_date,'DD-Mon-YYYY') || ' 11:00:00', 'DD-MON-YYYY HH24:MI:SS');
   ELSIF flag='2' THEN
   FromDateTime :=TO_DATE(TO_CHAR(s_date,'DD-Mon-YYYY') || ' 11:00:01', 'DD-MON-YYYY HH24:MI:SS') ;
   ToDateTime := TO_DATE(TO_CHAR(s_date,'DD-Mon-YYYY') || ' 13:00:00', 'DD-MON-YYYY HH24:MI:SS');
   ELSIF flag='3' THEN
   FromDateTime := TO_DATE(TO_CHAR(s_date,'DD-Mon-YYYY') || ' 13:00:01', 'DD-MON-YYYY HH24:MI:SS') ;
   ToDateTime := TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 15:00:00', 'DD-MON-YYYY HH24:MI:SS');
   ELSIF flag='4' THEN
   FromDateTime := TO_DATE(TO_CHAR(s_date,'DD-Mon-YYYY') || ' 15:00:01', 'DD-MON-YYYY HH24:MI:SS') ;
   ToDateTime := TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 17:00:00', 'DD-MON-YYYY HH24:MI:SS');
   ELSIF flag='5' THEN
   FromDateTime := TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 17:00:01', 'DD-MON-YYYY HH24:MI:SS') ;
   ToDateTime := TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 19:00:00', 'DD-MON-YYYY HH24:MI:SS');  
   ELSE
    FromDateTime := TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 19:15:01', 'DD-MON-YYYY HH24:MI:SS') ;
    ToDateTime := TO_DATE(TO_CHAR(S_DATE,'DD-Mon-YYYY') || ' 20:15:00', 'DD-MON-YYYY HH24:MI:SS');
   END IF;
0
i want to check if the Windows server has the following software installed on it.

IBM DB2
IBM IMS
Unisys RDMS
Unisys DMS
Sybase
Oracle

I believe we can check this if there are services running for each Software and need to know what service will indicate that the software is installed?
Any one please.
Thanks
0
Hi All,

In one of my PowerBuilder application there is an window which has 'Master' and 'Modified' list. Records present under 'Master' list are original and when any user makes any changes in any one of them or inserts new record then it will be shown under 'Modified' list, till the time it will be authorized by Authorizer.
There is only one datawindow: d_customer which is used for retrieving data in Master and Modified list, depending on the action ( 'I' (Insert), 'M' (Modify) ) performed details will be fetched in 'Master' / 'Modified' list.

My question is when any user updates/inserts any field it should be get highlighted and will be visible to Authorizer in Yellow color in 'Modified' list.
Could you please help me in implementing this problem statement, it will be great help. Thanks in advance.
0
Below is the output set I want from an SP. I will have count as input parameter to the  SP
so If count in 3 and I want the result to be c1, c2, c3, c4, c5,c6,c7,c8,c9
If the Count is 2, then c1,c2,c3, c4

Output of SP:
 
(OP)            C1            C2            C3           C4            C5            C6    C7          C8            C9

I know we can do like below, how do I do it dynamically?

SELECT '(OP)',           ' C1 ',   'C2', 'C3','C4','C5','C6', 'C7','C8',       'C9'
0
Now that the 12 has a feature of the columnar tables, had anyone did the performance comparision of Sybase IQ to that of Oracle 12c.  Did you use the 12C columnar table feature or  the traditional tables used for the migration. I have 1.8 TB of data going out from IQ to Oracle but not sure on the performance.
0
I have Needles as my case management software. It uses Sybase SQL Anywhere as the back end database.
I want to pull the data from Sybase into a SQL Server database so I can run query statements since I know SQL Server but not Sybase.
I am using a copy of the original database.
The company won't say how to do this. Their application has a very limited report writing tool and so we have to ask them to write repoerts for us. I want to get around this. Please advice. Thank you for your time.
Marina D.
0
How to find config id value from the below string? it can be any no of digits, but only digits. Essentially I want to find the value after --configId and  the space till the next space. That configId can be anywhere in the string and can have any no of digits.

String -->
/XX/XXXX/XXXXX/XX/XX -XX -- /xx/xxxx/xxxx/xxxx/xxxxxxx/xxx/xxx/xxxxxxxx.pl --configId 12107 --cfg /xx/xxxx/xxxxxxx/xxxxxx.xml

I am trying this but not working, not being able to get the length of the substring.
----------------------------------------------------------------------------------------------------------------------------------------
select substring(j.command, patindex('%--configId%',j.command)+9, PATINDEX('%[0-9][^0-9]%', j.command) - PATINDEX('%[^0-9][0-9]%', j.command)) from job j
0
Get proactive database performance tuning online
LVL 2
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Dears,

Is it right that the following 3 commands are not copies into the standby database:
•      select into
•      update statistics
•      Database or configuration options such as sp_dboption and sp_configure

*For select into, can we add this configuration : sp_setrepdbmode pdb, 'S', 'on'  ?
 If so, what about others? Do we have to apply them manually on standby database?
The same concern is about ALTER table in the active database, but for this I think it is replicated, isn’t it?
0
when i am creating a temp table in sybase i am getting this error. Can advice which property is blocking and how can i increase this number. or how to resolve such sybase issues.

Error msg is

"Number = 1701, severity = 16, state = 1, Message = create table failed because the minimum row size would be 4066bytes. this exceeds the max allowable size of a row for this table."
0
Dears, I was issuing my script for Sybase ASE database maintenance manually, which select some information from sysobjects and sysindexes relying on derived stats and insert those retrieved data into a temp table then iterate through it to rebuild index when it is needed, the details are in the attached file, please find it.

now, I want to execute this file automatically using a batch file, which calls the attached file but unfortunately the file doesn't execute cause the commands such as select into #temp, and select derived-stats and others.
is this right? or I miss some thing, please advice how can I run my script automatically???
rebuild-idx.sql
0
hi,

as I know replication server is belongs to the Sybase server and any technology different between Sybase replication server( need a separate license I know) and MS SQL build replication.

why someone still use Sybase ASE replication server if MS SQL already has it and why don't simply migrate to MS SQL?

and it seems I never heard about Oracle replication server, how oracle handle replication ? all relies on data guard ?
0
I have a table in which one column(attribute) have multiple values on the coma seprated basis. Now i need to break them Or convert into 1nf, So please tell me how to do this.
EX-      name      phone        educaion
           abc          x                   10,12 ,14
          cde           e                    10


now it should be converted into....>
             name      phone          education    
              abc          x             10
              abc           x              12
              abc           x              14
              cde          e              10
0
Hi,

I am trying to plot some long and lats from a Sybase 16 database into a SSRS Map report using SQL Server spatial query.

I am using the below code to generate the spatial data in Sybase:
ST_Geometry::ST_GeomFromText( 'POINT(1 1)' )

Open in new window


but when I click n next the wizard states that the dataset does not contain any spatial field.

Please help.

Thanks, Greg
0

Sybase Database

Sybase, a subsidiary of SAP, builds a client/server relational database management system. Products include Adaptive Server Enterprise (ASE), Adaptive Server Anywhere (ASA), Sybase Unwired Platform (SUP) for mobile applications, Afaria for enterprise mobile device management and IQ for data warehouse and big data applications.

Top Experts In
Sybase Database
<
Monthly
>