sybase-ase

How to get DDL for database objects shared to other user?

不羁岁月 提交于 2019-12-12 03:23:23
问题 We are working on extracting database DDL of Sybase ASE 15.5 version. We have one sample created in java that execute ddl commands. We got ddl using ddlgen utility provided by Sybase with commands : java -cp "mypath/lib/jconn4.jar;mypath/lib/dsparser.jar;mypath/lib/DDLGen.jar" com.sybase.ddlgen.DDLGenerator -Usa -Pmypassword -S192.123.13.111:5000 -Dmaster Above command generate DDL for all database objects exist in user sa , also we get list of objects shared to other user by user sa as :

Finding total number of tables in union query

a 夏天 提交于 2019-12-12 02:32:32
问题 I am writing a code which supports different versions of Sybase ASE. I am using union queries and the problem is that different version of Sybase ASE supports different number of tables in union query. The union query is dynamic and will be formed depending on the number of database present in the server. Is there any way in which I can find the max number of tables supported by a particular Sybase ASE? The only solution that I know right now is to fetch the version using query and pick out

Is there a better implementation for SybaseDialect in Version 3.0 of NHibernate?

给你一囗甜甜゛ 提交于 2019-12-12 01:34:45
问题 We have upgraded to NHibernate 3.0 with Fluent-NHibernate. In version 2.1.2 we where able to use the SybaseDialect for ASE 12. In version 3.0 SybaseDialect for ASE 12 is not supported. I reused the old Dialect from Nhib 2.1.2 and all is working. What I wanted to ask since this one was removed as it was considered not a good implementation, is there a better one out there? Since it's working I am not sure what improvements need be made but I thought I would ask. 回答1: This blog post has the

How to Copy a Timestamp Datatype

允我心安 提交于 2019-12-11 17:19:05
问题 I have a table with a TIMESTAMP column: create table dbo.EX_EMPLOYEE ( NAME_X varchar(10) null, RECORD_TIME_STAMP timestamp null ) when I copy the rows from one table to another, using either: SELECT * INTO EX_EMPLOYEE_T FROM EX_EMPLOYEE WHERE 1=0 or: INSERT INTO EX_EMPLOYEE_T SELECT * FROM EX_EMPLOYEE I get this warning: Warning: A non-null value cannot be inserted into a TIMESTAMP column by the user. The database timestamp value has been inserted into the TIMESTAMP field instead. The

Using merge to combine matching records

蹲街弑〆低调 提交于 2019-12-11 15:21:08
问题 I'm trying to combine matching records from a table into a single record of another table. I know this can be done with group by, and sum(), max(), etc..., My difficulty is that the columns that are not part of the group by are varchars that i need to concatenate. I'm using Sybase ASE 15, so I do not have a function like MySQL's group_concat or similar. I tried using merge without luck, the target table ended with the same number of records of source table. create table #source_t(account

SELECT INTO command not allowed within multi-statement transaction in Hibernate for Sybase DB

吃可爱长大的小学妹 提交于 2019-12-11 11:14:58
问题 I was new to hibernate and trying to execute an procedure from a Java file using hibernate to a Sybase DB. While i am trying to run the application i am getting an error like below Stored procedure 'dbo.p_chklist_test' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode. I have checked in few forums and set the mode as "Any mode" by running below command. sp_procxmode p_chklist_test, "anymode" Also i

Anyone know why I am getting this error when trying to load dataframe to sybase table? [sql alchemy]

此生再无相见时 提交于 2019-12-11 08:47:41
问题 I am trying to send append a pandas dataframe to an already created table, and I keep getting an error. I connected correctly to the server. Within the server, there are many databases, and then this table is within the db_STAFF database. Initially, I was doing df.to_sql(db_STAFF.dbo.JUNESALES) but I realized I should be referencing that in connString. I tried dbo.JUNESALES as well as just JUNESALES . The table name within the error below changes based on what I call the table ( dbo.JUNESALES

.net sybase executenonquery exception

▼魔方 西西 提交于 2019-12-11 08:36:09
问题 I am connecting to Sybase DB from my asp.net application using Sybase.Data.ASEClient namespace. With the recent production release of the App, we included a code in the DatabaseHelper class which just tries to do an ExecuteNonQuery(). In production the line that says command.ExecuteNonQuery(), was throwing an exception that says "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." But this does not happen consistently. The application works

Sybase Internal Error 30016

谁说胖子不能爱 提交于 2019-12-11 07:28:18
问题 Database server is migrated from version 12.5x to version 15.03 Sybase.Data.AseClient version - 1.15.50.0 I am getting below exception when I run few stored procedures through .Net app (using AseClient) Internal Error :30016 Unknown Dataitem Dataitem Stack Trace - at Sybase.Data.AseClient.AseDataReader.CheckResult(Int32 res) at Sybase.Data.AseClient.AseDataReader.RetrieveNextResult() at Sybase.Data.AseClient.AseDataReader.GetNextResult() at Sybase.Data.AseClient.AseDataReader.NextResult() at

Getting Exception 'Cannot convert '08/10/09' to a timestamp' while connecting to Sybase Database with .Net

泪湿孤枕 提交于 2019-12-11 06:20:09
问题 When I am trying to connect Sybase with c# by using AseClient , I am getting - {"SQL Anywhere Error -157: Cannot convert '08/10/09' to a timestamp"} System.Exception {Sybase.Data.AseClient.AseException} I dont know whats the reason my code is: var conn = new AseConnection(); conn.ConnectionString = "Data Source=myserver:port;" + "Initial Catalog=mydb;" + "User id=uid;" + "Password=pwd;"; conn.Open(); The error i am getting is Cannot convert '08/10/09' to a timestamp I haven't used the date