Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Dears, I have sybase replication server 15.7
I ran sysadmin hibernate_on to be able to purge queues, now I try to run sysadmin_off but the server became hung and not reactive , even after  restarting the sybase service .

please advice how can I re-active the server and finish its hibernation mode
Keep up with what's happening at Experts Exchange!
LVL 11
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

My question involves not only Oracle but Sql server and Sybase. I am wondering if there is a way to monitor database changes so to prevent catastrophic events so to speak in the database. By catastrophic events, below are some examples.
The reason I am asking this is that on my job I work with about 6 different databases. two are Oracle, two are Sybase and two are Sql server. I need to somehow monitor any catastrophic changes to the database. Is there a way to do that? I have an application that accesses the databases and of course the application will crash if certain catastrophic events occur. But sometimes running the application is not enough, so to somehow monitor any database changes would be great.

- Deletion of linked servers
- Deletion of user accounts
- Deletions from key tables
But whenever possible have a unique clustered index.  For example, on the state codes table, a unique clustered index on state_code would work just fine.
i am reading as above.
what is meaning of unique clustered index and how it is different from regular index. please let me know advantages of using it.

please advise
I had a situation where a '\x0d' charater was appearing (appended) to the data in a single column.

In a stored procedure, data is retrieved and a #table is used for data manipulation.
At the end of the proc, the data is inserted into a permenant table, selecting from the #table.
However, in 1 column (not all) a carriage return, '\x0d', was appended to the data.

this was not in the #table and I could not see why this was happening.

I recompiled the permenant table and the error disappeared.

My concern is this is a production procedure & table, and it is not feasible to re-create the table and rerun the procedure every time (if) it reappears.

Any experience of this issue?
Any theories??

Dear Team,

Following is the error is received in the ASE errorlog,

Error: 12301, Severity: 20, State: 1
00:0002:00000:00211:2017/12/13 17:57:16.79 server  Internal error: the index (id = 2) and the data for row (26710892, 25) in table 'BUT000', database 4 are inconsistent; data is marked deleted but index is not. Aborting the transaction.

After that not able to connect dataserver, below is the error,

--Server is up and running but i'm getting below error Read from the server has timed out.

$isql -U -S -P
        ct_connect(): user api layer: internal Client Library error: Read from the server has timed out.
Here is the solution for that question,  

select sysuser.user_name,table_name,systableperm.*
from systable,systableperm,sysuser
where stable_id=systable.table_id
and systableperm.grantee=sysuser.user_id
and sysuser.user_name='put_user_name_here'
Well I would like to build a e-commerce site in .net  
I stucked in designing the DB tables , and my problem IS:

let us say I need as a seller to sell a 2 products :
1. ring
2. cat

the "Ring" product have this fields:
A. category :"Product"
B. CategoryType : "jewelry"
C. ProductCondition: "New"
D. ProductMaterial: "Silver"

the "Cat" producthave this fields:
A. category :"Product"
B. CategoryType : "Pet"
C. Age : "1 year"
D. Color : "White"

It means , that will be MANY products at same category  with VARY different fields/sub-category .
how can i solve this problem in designing the DB field/tables/relations between each other?
why we need junction table for many to many.

i am not clear on that concept. can you please elaborate with example tables with data?
i am going through below link but not completely clear
please advise
What is normalization concept

if a table called Student as below with 4 columns and data as below

Student table

StudentName YearOfStudy Subject TeacherName
john                    10thGrade    Maths    Ashley

why it is better to move away Teacher information to separate table as below

Teacher Table

TeacherName TeachingSubject
Ashley                 Maths

what is various types of normalizations?
Please advise

I need your help please.

I'm using Sybase database to complete this task.
I have update BSTX_TEXT field that is VARBINARY TEXT

The field currently encrypted and stored as VARBINARY TEXT
what I want is to change the text field name in it.

Is there a way to read this VARBINARY ?


[Webinar On Demand] Database Backup and Recovery
LVL 11
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

i am not good with table relationships on primary foreign key and 1-n and n-1 etc relationships, data model diagram reading esp when there are 100 tables connecting one other? how do i go about digesting those diagrams.
shoe i take printout and using a pencil mark physically which table is talking to which super table and sub table.

please advise any good links, resources, training, free video tutorials on this.
this concept is same across any kind of database right?
Does anyone have some code they can share with me. I need to grab table names in a database and grant permissions on the tables. I think this can be done with a Cursor, but I don't know how to do it, and am up against a deadline. If someone can help I would really appreciate it.
We are working with a Sybase database and would like to know the names of all of the linked servers, if any; which are currently set up in Sybase ASE. Does anyone know how to look at the linked servers for Sybase?
Hello Experts

How to set the column width in sybase databse.I am looking for alternative of oracle alternative "column <column name> format a<width>" in Sybase.

Vinit kumar
dears, I use reorg rebuild index to maintain indexes on table with data lock ,

but what can I use with allpages locking table? how to maintain its indexes, then update statistics??

kindly help
Dears, kindly note this case,
we have Sybase ASE, I take a full dump daily at midnight, and an incremental dump every 30 minutes, I know the dump transaction truncates the log and this is what happened usually, but sometimes the dump transaction taken successfully while the transaction log INCREASE its size for a period maybe 3 days, I think this is because an open transaction which is not committed yet,
how can I be sure about my thinking, and how can I found what is the uncommitted transaction, such a transaction is executed by other employees and in the background of our application , i.e  no body know exactly what is a statement

Dears, kindly help in the following case:

I want to archive a very large table in our production database, by moving it's data to an exact table in another database on another server, then delete data from the original table.

but I want to do this archiving periodically, this means, I need to set a range of data to be moved , I'm planning to use bcpout, then bcp in in the target table,

as we cannot set a range by this tool , I'm thinking to insert part of data in a temp table

(select * into tempdb..tbl1 from tbl1 where date between @date1 and @date2),

then use bcpout on this temp table.

But the case is the data which will copied in the temp table is about 300 MB, while the unused space in the temp database is just 120 MB.

this temp database in the production server, and it is used besides the prod database in many application,

is there any hint to over this problem, or there is another way to archive my data?

please help.
 alert VARCHAR2(100);
      rowcount      number;

if (alert=Alert_button2)then

elsif (x=Alert_button1)then
      SELECT COUNT(*) INTO rowcount FROM om_customer WHERE cust_credit_ctrl_yn = :Rep_value_3;
      if (rowcount>0) then
      UPDATE om_customer SET cust_credit_ctrl_yn='Y'
   (SELECT * FROM om_customer
   WHERE cust_credit_ctrl_yn= :Rep_value_3
   and cust_code= :Rep_value_2));
Hi Experts,
How to check the status of Sybase database are online or offline.
I know sp_helpdb , But is there any other better command which shows state of database.
Become an Android App Developer
LVL 11
Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.


I am working with VS2015 C#. Trying to execute a stored procedure from a Sybase db.

It seems to be not receiving the parameters I am trying to send it. I attached the code I'm using with the error msg that I'm receiving.

I'm using this connection string:
Data Source={Adaptive Server Enterprise};server=ppw.amgreetings.com; db=db_cis00;uid=cis;pwd=hotstam;

I am able to receive data back from this db by using embedded sql, but the sp is having issues.

Do you guys see anything I could try differently?

Hi Expert,
We are not sure what is the use of SID_AUDIT database, but i understood we will created this as part of post configuration
Can you please tell us what is the use of CMS and Audit database.
Some times database  fills up and we need to add 20gb of space.
Can you tell us how can we analyse this situation.
Hi Team,

I need to write a stored procedure to insert and delete a record in a table in sybase . Iam new to Sybase , below is the code I wrote in Oracle stored procedure
-- Oracle version
Create or replace procedure p1 (id number , status out number)
insert into t1 values (id);

delete from t2 where empid=id;
when others then
dbms_output.put_line(SQLCODE || SQLERRM);

I need to write the above logic in sybase , any help is really appreciated.  I have tried the below code  , need an help on the exception handling section

create procedure p1 (@id int , out @status int)

insert into t1values (@id);
delete from t2 where empid=@id;
set @status=0;
-- Need help on how to write an exception block which can handle the error

I am accessing in Access, using the sybase ase 15.7 driver, a sybase table that has date/time fieds. However, when accessing that table over an ADODB connection, the values returned are always only a date without time. If I use convert(varchar(8), <datetime field name>, 8) to get the time part, I invariably get a 00:00:00 time, although I KNOW that these fields all have a non-zero time value.

The weirdest is that, if I just open the table in Access (using the SAME ODBC driver to link the table), I see the time in these fields !

What is going on, and how can I get the time portion of these dates ?

Thanks for help.
Hi Team,

I need to create a stored procedure which inserts rows from an Emp table into the Staging table

Stageing Table
Create table EmployeeStg
Age INT);

Original Table

EMPID         ENAME                      Age
1               sam                              40
2               xyz                                 20
3              dfdf                               34

My question how can I insert rows EmployeeStg using Employees table from a Sybase stored procedure . Can I use Select into clause . What is the best way to achieve this .

Any sample code is reaaly appreciated. Since MSSQL and Sybase use T-SQL , Iam moving this under both MSSQLSERVER and Sybase database
Hi Team,

Iam new to Sybase  and unix , I need an help in writing a shell script which will  pass  the shell script parameters to the stored procedure .  The below code throws an error ,Any help is really appreciated

Procedure DeleteData
@Empid INT,
@empType VARCHAR2(40),
@status OUT INT


Delete from TempEMp where empid=@EMPID;


I need to call this storedprocedure from the shell script


EmpId =$1
result=$(isql -usam -p sam123 -slocalhost << EOF

 DeleteData $EmpId, $EmpType , $Status

If [ $Status -eq 0 ]
      echo "Success"
    echo "failure"

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