Start a new topic

Sybase ASE 16 - Change Page Size

I am looking for some support on few topics in Sybase ASE 16.


1. How Do I get schema of a table. I am using below SQL to get table name and column names in a database but not able to get Schema info.

select so.name table_name,
       sc.name column_name,
       st.name data_type,
       st.length max_length,
       sc.colid colnumber
  from sysobjects so inner join syscolumns sc on sc.id = so.id inner join systypes st on st.usertype = sc.usertype
 where so.type = 'U'
 order by table_name, colnumber

 This gives me info as follows. But I miss "pubs3" as schema. How to get it?

authors	au_id	id	11	1
authors	au_lname	varchar	4096	2


2. I installed my Sybase with page size = 4K. This limits the maximum sizes of my BINARY and VARBINARY columns to 4010 bytes. Is there a way I increase it to 16K without reinstalling the database.


3. I am storing ZIP file of 2000 bytes into a BINARY column. When I read this information through a CSharp code, using "Sybase.Data.AseClient" with following code and extracting the text using TiKa extract, the extraction fails. This code is absolutely working with a ZIP file in IMAGE column and for a plain text file in BINARY column.


using TikaOnDotNet.TextExtraction;
using Sybase.Data.AseClient;

var _te = new TextExtractor();
AseConnection conn = new AseConnection();
conn.ConnectionString = SqlConnectionString;
IDbCommand cmd = new AseCommand(qryStmt, conn);
conn.Open();
IDataReader reader = null;
reader = cmd.ExecuteReader(System.Data.CommandBehavior.Default);
try
{
	while (reader.Read())
	{
		int len = Int32.Parse(reader["LEN"].ToString());
		byte[] b = new byte[len];
		reader.GetBytes(reader.GetOrdinal(colName), 0, b, 0, (int)len);
		try
		{
			var textExtractionResult = _te.Extract(b);
			string txt = textExtractionResult.Text;
		}
		catch (System.Exception Ex2)
		{
			ex.Rows.Add(qryStmt,"Error (also while trying to scan without extracting): "+Ex2.Message);
		}	
	}
}

Any support in this regard is highly appriciated.


Regards

SP

1 Comment

Hi,


These are question about Sybase database features, but this forum is about how to use DbVisualizer. You need to ask for help in a Sybase forum.


Best Regards,

Hans

Login or Signup to post a comment