Sybase Database

4K

Solutions

2

Articles & Videos

3K

Contributors

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 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
Enroll in June's Course of the Month
LVL 8
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

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
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
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
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
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
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
On Demand Webinar: Networking for the Cloud Era
LVL 8
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Dears,
I was using sybase ASE 15.03 and sybase replication server on the same version, recently, we upgraded the ASE on our production server to 15.7, can we keep using of sybase replication 15.03 or we have to renew its license?
kindly note we  also installed sybase 15.7 on DR site

please advice
0
Could anyone please explain when to use clustered and non cluster indexes in sybase ase?

Thanks in advance.
0
hi,

i know how to select top 100 rows or bottom 100 rows from sybase sql statement but how can get only middle rows like from 501 to 1000 rows,

for top 100.. i use
select top 100 * from tablename

for last 100.. i use
select top 100 * from tablename order by columnA

how can i pull out all rows from 501 to 1000 rows?

thanks
0
I am using Sybase IQ select @@version SAP IQ/16.0.110.2014/10214/P/sp11/Enterprise Linux64 - x86_64 - 2.6.18-194.el5/64bit/2015-11-21 01:29:07

I need to build a tree on a table which consists more than Million records which links for every order_id. Need to find what it was replaced by existing order_id until the end and eventually need to find the various quantities of each of these order_id and get the max out of it.

Below is my sample data
create table #tmporder ( account_key varchar(50) not null, order_id varchar(50) not null, msg_type varchar(5) not null, repl_by_order varchar(50) not null, replaces_order varchar(50) not null, quantity numeric(12) not null, order_datetime datetime not null, order_status varchar(1) not null );

INSERT INTO #tmporder (account_key,order_id,msg_type,repl_by_order,replaces_order,quantity,order_datetime,order_status) VALUES ('123456','6473','PL','0','0',1000,{ts '2016-10-07 07:59:10'},'1');

INSERT INTO #tmporder (account_key,order_id,msg_type,repl_by_order,replaces_order,quantity,order_datetime,order_status) VALUES ('123456','6473','MO','6480','0',1000,{ts '2016-10-07 07:59:10'},'5');

INSERT INTO #tmporder (account_key,order_id,msg_type,repl_by_order,replaces_order,quantity,order_datetime,order_status) VALUES ('123456','6474','PL','0','0',1000,{ts '2016-10-07 08:16:05'},'1');

INSERT INTO #tmporder (account_key,order_id,msg_type,repl_by_order,replaces_order,quantity,order_datetime,order_status) VALUES 

Open in new window

0
Hi,
When I run sp_helpdb procedure I get the following information:

 device_fragments               size          usage                created                   free kbytes
 ------------------------------ ------------- -------------------- ------------------------- ----------------
 XX_data_01                       1024.0 MB data only            Nov 20 2015  2:08PM                  12400
 XX_data_02                       1024.0 MB data only            Nov 20 2015  2:52PM                  96432
 XX_data_01                       1024.0 MB data only            Nov 20 2015  3:26PM                 176784
 XX_data_02                       1024.0 MB data only            Nov 20 2015  4:05PM                 176800
 XX_data_01                       1024.0 MB data only            Nov 20 2015  4:54PM                 196720
 XX_data_02                       1024.0 MB data only            Nov 20 2015  5:08PM                 225680
 XX_data_01                       1024.0 MB data only            Nov 20 2015  5:19PM                 583200
 XX_data_02                       1024.0 MB data only            Nov 20 2015  5:34PM                 614080
 XX_data_01                       1024.0 MB data only            Nov 20 2015  6:00PM                 736784
 XX_data_02                       1024.0 MB data only            Nov 20 2015  6:29PM                 485808
 XX_data_01                       1024.0 MB data only            Nov 20 2015  7:06PM                 206848
 XX_data_02 …
0
I had this question after viewing SQL Query Producing decimal places when it shouldn't be.

Ok so now I have another issue....even though the DataGridView is showing the value correctly with 2 decimals, when I export the DataGridView to CSV, it STILL shows the 6 decimal places. Here is my export to CSV code:

  StreamWriter sw = new StreamWriter(file_path);

        if (headers)
        {
            for (int i = 0; i < dgv.Columns.Count; i++)
            {
                sw.Write(dgv.Columns[i].HeaderText);
                if (i != dgv.Columns.Count - 1)
                {
                    sw.Write(",");
                }
            }
            sw.Write(sw.NewLine);
        }       

        foreach (DataGridViewRow dr in dgv.Rows)
        {

            for (int i = 0; i < dgv.Columns.Count - 1; i++)
            {
                if (quotes)
                {
                    sw.Write("\"" + dr.Cells[i].Value.ToString() + "\"");
                }
                else
                {
                    sw.Write(dr.Cells[i].Value.ToString());
                }
                if (i != dgv.Columns.Count - 1)
                {
                    sw.Write(",");
                }
            }

            sw.Write(sw.NewLine);
        }
        sw.Flush();
        sw.Close();

Open in new window



I think it has to do with the .Value.ToString and the fact that it doesn't see the DefaultCellStyle.Format = "f2"

Thoughts?
0
Hello Experts,

I am running the below query then displaying the results in a DataGridView in VS2015 (C#)

SELECT
                                                    employee.empnum AS [Employee_ID],
                                                    punchclock.snum AS [DeptCode],
                                                    CONVERT(VARCHAR,punchclock.opendate,101) AS [Date],
                                                    CONVERT(VARCHAR(5), punchclock.punchin,108) AS [PunchTime],
                                                    CASE WHEN punchclock.typepunch = 4 THEN 'ID' WHEN punchclock.typepunch = 5 THEN 'OB' ELSE 'Error' END AS [PunchType],
                                                    punchclock.jobtype AS [EarnCode],
                                                    '' AS [TaxCode],
                                                    '' AS [Comments],
                                                    '' AS [LaborAllocationCode],
                                                    '' AS [Hours],
                                                    CAST(tip AS DECIMAL(10,2)) AS [Dollars],
                                                    '' AS [TemporaryRate]
                                                    FROM
                                                    punchclock, employee
                                                    WHERE
                                                    employee.empnum = punchclock.empnum AND

Open in new window

0
Hi,
I've Sybase ASE 15.7 version.

Often I have a process that fill up my transaction logs, to see which process is responsible for filling up the logs I run this query:

select loginfo('<dbname>', 'database_has_active_transaction'),
    loginfo('<dbname>', 'oldest_active_transaction_pct'),
       loginfo('<dbname>', 'oldest_active_transaction_spid'),
       loginfo('<dbname>', 'can_free_using_dump_tran'),
       loginfo('<dbname>', 'is_stp_blocking_dump'),
       loginfo('<dbname>', 'stp_span_pct')
go

and after I kill the spid to free up space

kill <oldest_active_transaction_spid>
go

 
To details of the session I use "sp_who" procedure or this query:
select spid, status, hostprocess, program_name, clientname, loggedindatetime
from sysprocesses
go

But I'd like to get more details about the session that filled up my transaction logs, for example I'd like to know the exact SQL text that is being executed for "oldest_active_transaction_spid".

In addition is there a system table or history log file where the statements by a SPID are stored?

Thanks in advance!
0
hi

what is the difference between syslogin and sysusers in sybase database.


thanks
0
[Webinar] How Hackers Steal Your Credentials
LVL 8
[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Hello Experts,

I have a SyBase database and when I select the field I get

9/19/2016 4:05:00 PM

I want to return only the the time portion in HH:MM 24 hour format....desired return is: 16:05

Another example:

9/19/2016 12:53:00 PM should return 12:53


I cant seem to find the right combination of date/time format to get me this....help?
0
We run a number of reports for our business throughout the day.
These queries are executed by the Task Scheduler via VB scripts.

The queries query our CRM database, and use an ODBC connection.

It appears, the queries "lock up" our CRM application whilst they're running.
The CPU usage spikes on the server when the queries are being run, and users complain their application freezes.

Does anyone have any ideas how we could minimise the impact? Restrict the CPU usage or something?

The database being queried is a sybase database.
0
Hello,
I’m trying to create a web application that uses a Sybase database (Adaptive Server Anywhere 7) . The platform I use is visual studio 2015 community. When I’m running the application in debug mode from my computer, there is no problem. On the other hand when I publish my project and try to connect to the site from another computer I see this error: error im014 microsoft odbc driver manager the specified DSN contains an architecture mismatch between the Driver and Application.
I am new to this, so even though I’ve searched a lot and I understand that is something about 64bit application and 32bit DSN, I can’t make it work.
Any help is appreciated. If you need any more information please ask.
0
I am inserting records into a Sybase Table using
I am using a C# program to read in the records from a txt file named InputFile.txt into a Sybase table titled tableA.
One of the fields I read into tableA has a title "age" which has a datatype of varchar(3).
Let's say I read in the records as follows:

                   while ((line = file.ReadLine()) != null)
                    {
                        DataRow row = dt.NewRow();
                        row["age"] = line.Substring(45, 3);

Then I select the records from tableA insert them into another table, tableB that has a field titled "AgeDays" that is an INT type field. This is carried out as follows:

INSERT INTO tableB (
            AgeDays  )      
           SELECT
           CONVERT(INT, W.age) * 1 AS Expr4

If a record in the InputFile.txt has an Age value of '000' that is imported into the field tableA.age, what value would appear in tableB.AgeDays after the insertion statement is executed?
0
This question seems to be pointless. But we have an old stored procedure inserting data without a column list and there is a new column. Procedure is not working in test environment giving an error due to missing value for the new column. But it seems working in production. Is there a way to make such a procedure working?

More concretely, let's say we have table A with column a and b; and also a proc with an insert statement like "insert A values (x, y)"

Then column c with a default value has been added to table A. Is there a way to make the insert proc working even though there is no column list?

This is ASE 12.5.3
0
Dears, I have the following case and need some help please,

and sorry for my fresh experience with Sybase Replication.

I have one production server (sybase ASE 15.7) stores one production database.

I will install a replication server on a different server (but it is in the same building, so it will connect with the production server over LAN )

I will install replication server and create a new database repDB on it, and make employees retrieve reports from this database (to reduce load on production database)

so what is model  should I use for this replicate database?

On the other hand, I will install a new replication server on a far place (over WAN), and here I have to use Warm standby application, is this right,  even though the primary and standby database will be managed by different replication servers?? kindly note here I will use the first repDB (located on replication server in the same building with production server) as primary database.

Am I in the right way, and what are your suggestions about this issue?

please advice.

Thanks in advance
0

Sybase Database

4K

Solutions

2

Articles & Videos

3K

Contributors

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
>

No Top Experts for this time period. Answer questions to earn the title!