sybase

why spring jdbcTemplate batchUpdate insert row by row

六眼飞鱼酱① 提交于 2019-11-30 14:32:22
I have 200K rows to be inserted in one single database table. I tried to use jdbcTemplate.batchUpdate in spring in order to do insertion 10,000 per batch. However, this process consumes too much time (7 mins for 200K rows). So on database side, I check the number of rows inserted by select count(*) from table_X . I found the number of rows increased slightly instaed of 10K expected. Can anyone explain what's reason or is it something which should be configurated on Database side ? PS: I am using sybase .... Sanka There are lot of approaches available on the web. Performance directly depends on

Split/explode comma delimited string with Sybase SQL Anywhere [duplicate]

我们两清 提交于 2019-11-30 14:23:54
问题 This question already has answers here : How do I split a string so I can access item x? (45 answers) Closed 5 years ago . UPDATE: Someone marked this question as duplicate of How do I split a string so I can access item x. But it's different, my question is about Sybase SQL Anywhere, the other is about MS SQL Server. These are two different SQL engines, even if they have the same origin, they have different syntax. So it's not duplicate. I wrote in the first place in description and tags

How to backup and restore sybase database tables using command line [closed]

一曲冷凌霜 提交于 2019-11-30 09:58:49
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How can I backup my sybase tables and restore using command line? please help me with the command using bcp I have tried using sybase central GUI Thanks. 回答1: Since you didn't specify whether you are running on Windows or Unix I'll try to cover both. Unix bcp is located in $SYBASE/$SYBASE_OCS/bin/ Windows bcp is

Best practices for multithreaded processing of database records

白昼怎懂夜的黑 提交于 2019-11-30 08:46:07
I have a single process that queries a table for records where PROCESS_IND = 'N', does some processing, and then updates the PROCESS_IND to 'Y'. I'd like to allow for multiple instances of this process to run, but don't know what the best practices are for avoiding concurrency problems. Where should I start? The pattern I'd use is as follows: Create columns "lockedby" and "locktime" which are a thread/process/machine ID and timestamp respectively (you'll need the machine ID when you split the processing between several machines) Each task would do a query such as: UPDATE taskstable SET

Get records from last hour

放肆的年华 提交于 2019-11-30 08:27:17
I have this query: SELECT Field1, OrderFor, Writeback, Actshipdate, Orderstatus, receivedate, receivetime FROM orderinfo, shippinginfo WHERE orderinfo.orderid = shippinginfo.orderid AND shippinginfo.custid = '37782' AND receivedate = DATE(NOW()) AND receivetime = ??????? I am using Sybase adaptive server anywhere and trying to get records for the last hour. try this !! SELECT Field1, OrderFor, Writeback, Actshipdate, Orderstatus, receivedate, receivetime FROM orderinfo, shippinginfo WHERE orderinfo.orderid = shippinginfo.orderid AND shippinginfo.custid = '37782' AND receivedate = DATE(NOW())

Sybase数据库日志损坏时重建日志启动数据库的解决办法

一个人想着一个人 提交于 2019-11-30 02:41:15
首先判断错误为页损坏或者索引损坏,根据 Adaptive Server failed to retrieve a row via its RID in database 'escourt5' because the requested RID has a higher number than the last RID on the page. Rid pageid = 0x1c88a8; row num = 0x27. Page pointer = 0x261CA000, pageno = 1869992, status = 0x1, objectid = 8 , indexid = 0, level = 0. 判断其中 :objectid = 8 表示日志段有问题 解决方法一:截断日志 先把 sysdatabases 的 status 修改成 -32768 然后重新启动数据库 1>update sysdatabases set status = -32768   where name = "escourt5" 4>go 登陆数据库 1> dump transaction escourt5 with truncate_only 2> go Msg 921, Level 14, State 1: Line 1: Database 'escourt5' has not been

How do I limit the amount of results returned in Sybase?

ε祈祈猫儿з 提交于 2019-11-30 00:57:53
问题 I need to query a Sybase database which has a lot of data in it, and would like to set a limit so the DB stops the query after 10 results. The key thing is performance, so it would be no use if it searched all results and then then returned the last 10 results. Thanks in advance 回答1: I believe you can do a SET ROWCOUNT 10 first, then all queries in this session until a further SET ROWCOUNT will return no more than 10 rows. As a comment points out, this affects all following queries in the

How to backup and restore sybase database tables using command line [closed]

十年热恋 提交于 2019-11-29 18:02:35
How can I backup my sybase tables and restore using command line? please help me with the command using bcp I have tried using sybase central GUI Thanks. Michael Gardner Since you didn't specify whether you are running on Windows or Unix I'll try to cover both. Unix bcp is located in $SYBASE/$SYBASE_OCS/bin/ Windows bcp is located in %SYBASE%\%SYBASE_OCS%\bin Export bcp DB_NAME..TABLE_NAME out TABLE_NAME.bcp -Sservername -Uusername -Ppassword -[c or n] Choose either -c or -n depending if you want the file to be human readable or not. I recommend using -n unless you have a compelling need to

Identifying Sybase tables, fields, keys, constraints

◇◆丶佛笑我妖孽 提交于 2019-11-29 16:19:35
I'm trying to set up a Sybase query that will give me the following output: Table KeyType KeyNumber Column table1 PK 1 table1_id table1 FK 2 table2_id table1 FK 3 table3_id table1 FK 4 table4_id table1 Unique 5 table1_abc table1 Unique 5 table1_def In other words, I need the PK for each table, and every foreign key it has, as well as every unique key (not where a key has more than one element, such as the unique key above, this is identified by having the same KeyNumber). I'm guessing I need to use sysobject, syscolumns, syskeys and sysconstraints but I can't seem to figure out how they

Sybase PowerDesigner 16 安装、破解、汉化教程

梦想的初衷 提交于 2019-11-29 15:33:18
今天一位好友问我,有没有PowerDesigner的破解包?WTF,作为一个程序猿竟然不会破解工具软件?我只好把我电脑上15版本的发给他了,版本比较旧。这篇文章教大家怎么找破解包,破解汉化教程。只网上找破解软件,自己不参与破解。 软件介绍 PowerDesigner16.5破解版是一款业内领先且开发人员常用的数据库建模工具,PowerDesigner可以从物理和概念两个层面设计数据库。它几乎包括了数据库模型设计的全过程,是Sybase公司为企业建模和设计提供的一套完整的集成化企业级建模解决方案。 教大家怎么找破解包 1、度娘搜索 2、找到下载地址 找到类似这样的下载地址,下载的才是正确的安装包,其他都是广告。 3、双击exe文件安装,选择安装路径 4、注册方法 将下载下来的PowerDesigner165_破解文件.rar进行解压,之后找到pdflm16.dll破解文件,并将pdflm16.dll 复制到powerdesigner安装目录覆盖即可pojie注册。 例如:我本机的power designer 安装在以下目录: D:\AppInstall\PowerDesigner16 破解要做的事情就是把下载得到的 pdflm16.dll 文件 覆盖到你的安装目录去(D:\AppInstall\PowerDesigner16)。 注意:如果你在安装途中修改了安装位置