sybase database garbled text problem

2010-03-11  来源:本站原创  分类:Database  人气:195 

1.Sybase database log full

When this situation occurs often can query data, but can not update the data, start affairs. Tracking can be found in the code, the connection can be opened, but the transaction is not open. Often prompt "Connection to Sybase server has been lost. All active transactions have been rollbacked" error message.
Solution:
If the development of the database, you can directly clear the log. If the official database: It is recommended back up the current log and then clear the log, logging equipment and log database extension. Clear the log statement was

dump   transaction   database_name   with   no_log

2.Sybase Chinese garbled

This occurs because the sybase server character set or the client does not support Chinese character set and server character set inconsistent. Consider changing the default character set sybase. In Sybase12.5 version support Chinese character sets are CP936, EUCGB, UTF-8 and GB18030. Here we set for the Sybase server does not support Chinese characters are given a solution:
Solutions (installation cp936 character set):
Suppose sybase installation path "D: \ Sybase".

(1) D:\>cd \sybase\charsets\cp936
   (2) D:\sybase\charsets\cp936> charset -Usa -Psa_pass -Sserver_name binary.srt cp936

(3) perform in InterActiveSQL 『select name, id from syscharsets』, must be noted that here to select the "master" database, execute, step 4 also. Find a name for the cp936's ID, assumed to be 171.
(4) to perform in InterActiveSQL 『sp_configure 'default character set id', 171』
(5) restart the Sybase service twice. Because the first start automatically after the end of fall, so need to restart the second time.

3.Sybase export import the entire library database

Export

:declare @filename varchar(30)
                     select  @filename='E:\BCP\bf_' + Convert(varchar(10),getdate(),110) + '.dat'
                     dump  database   ExamSysDB   to   @filename
                          go

Import:

load database pubs2
               from 'E:\bcp\bf_080101.dat'

4.bcp import and export data

Into ExamSysDB database TB_USER table:

bcp ExamSysDB..TB_USER in C:\BCP\SqlServerOut\TB_USER.bcp -Usa -P -SSyDevserver -Jcp936 -c

Export ExamSysDB database TB_USER table data:

bcp ExamSysDB..TB_USER out C:\BCP\SqlServerOut\TB_USER.bcp -Usa -P -SSyDevserver -Jcp936 -c

SQL reference bulk import data

set nocount on use ExamSysDB
go
select 'bcp ExamSysDB..' + name + ' in C:\BCP\SqlServerOut\'
    + name + '.bcp -Usa -P -SDEVSERVER -Jcp936 -c '
  from sysobjects
 where type='U' and name like '%TB_%'
go

SQL batch export data reference

set nocount on use ExamSysDB
go
select 'bcp ExamSysDB..' + name + ' out C:\BCP\SqlServerOut\'
    + name + '.bcp -Usa -Pdbadmin -SDevserver -c '
  from sysobjects
 where type='U' and name like '%TB_%'
go
相关文章
  • sybase database garbled text problem 2010-03-11

    1.Sybase database log full When this situation occurs often can query data, but can not update the data, start affairs. Tracking can be found in the code, the connection can be opened, but the transaction is not open. Often prompt "Connection to Syba

  • Reprinted: teach you solve the garbled text problem under Tomcat 5 2009-12-12

    http://tech.ccidnet.com/art/3539/20071205/1298139_1.html When using the tomcat, I believe we all return to the problem encountered by the Chinese garbled, specifically manifested in the form obtained by the Chinese garbled data. Here is my solution p

  • Sybase Database garbled 2010-07-21

    Question: Sybase v12 backup file into Sybase v15, the character display reasons: the database character set is not the same, v12 and v15 is the CP850 is the CP936 Solution: the v15 of the character set to CP936 1, the installation CP936 character set

  • Garbled text file import problem 2010-05-14

    Import the file through the Tomcat service to the main database garbled, first, the text file itself, does not mandate the encoding format (garbled proposes to use to solve the Chinese UTF-8 format), use the default save, so when the time will garble

  • Sybase database, the problem of fuzzy query 2011-01-07

    Today came across a very strange question, Sybase database fuzzy query (like), the query results may be wrong. For example: select Name from TestTable where Name like '% Oh %' Check out the results will not include the name of "Oh," the data. An

  • Sybase database query problem fuzzy 2011-01-07

    Today came across a very strange question, Sybase database for fuzzy queries (like), the results may be wrong. For example: select Name from TestTable where Name like '% Oh %' Check out the results will not include the name of "Oh," the data. An

  • bcp sybase database backup tool 2010-02-10

    ============= [October 24, 2007] PM ============================ === Dinner at noon today on the way to casually ask how to export data Xiaoming sybase, bcp can say so little, and then a look at google found bcp, looked for a moment its parameter lis

  • Sum up the work in the Sybase database (1) 2010-04-08

    1.BCP command BCP is a SYBASE database table provides a dedicated data backup tool. Generally stored in the installation of ASE or Open Client's BIN directory. 12 version of the previous ASE, bcp store directory is $ SYBASE / bin 12 version (with 12

  • Sum up the work in the Sybase database (2) 2010-04-08

    Sybase database using the command mode operation This article includes command mode startup and shutdown database, create database, backup database and export the database structure of four parts. (A) startup and shutdown database ² UNIX platforms: S

  • Sybase database on the link to install DBArtisan, the report documents the lack of libct.dll and libcs.dll 2010-12-20

    http://blog.csdn.net/sdytgl/archive/2008/10/16/3085363.aspx http://liss.javaeye.com/admin/blogs/847455 A, QQ always dropped some time ago has been CCTV watching the Olympics live online, but while watching it live on the inexplicable QQ always droppe

  • Sybase Chinese garbled solution 2011-07-19

    Sybase Chinese garbled due to the default encoding set to ISO-1, in the Sybase Central v4.3 is garbled in Chinese, will change the CP936 or CP850 character set, the Chinese garbled solution. Replacement character set method: First, open the Sybase Ce

  • DBArtisan link sybase database installed, the report documents the lack of libct.dll and libcs.dll 2010-12-20

    http://blog.csdn.net/sdytgl/archive/2008/10/16/3085363.aspx http://liss.iteye.com/admin/blogs/847455 A, QQ always dropped some time ago has been watching the Olympics live online in CCTV, but watching it live, while QQ is always somehow dropped. Susp

  • Sybase Database maintenance 2011-02-21

    Sybase Database maintenance maintenance purposes: The current operational status monitoring database, to ensure stable operation of the database. Do the daily backup of the database work, to reduce the risk of problems and responsibilities when Detec

  • The full amount of the Sybase database backup program 2011-03-04

    Sybase database products since its inception in 1987, its client / server (client / server) mode, the foundation distributed processing architecture, improved security performance, high-speed and efficient operation mode, multi-platform operating sys

  • sybase database using a laptop 2011-08-10

    A recent project using sybase database. . . An egg is called pain. . . Out of the injury. . . First garbage problem: This is a platitude. Internet connection string that followed a charset = cp850 on the line. . I tried the next not. . . And then say

  • Sum up the work in the Sybase database (3) 2010-04-08

    Simple operation command sybase database 1, the backup database dump database database_name to dump_device Description: database_name is the name of the database to be unloaded, dump_device name of the device is unloaded. With the system process sp_h

  • Sum up the work in the Sybase database (6) 2010-04-08

    Some exceptions and on the common approach 1. The following statement is used to handle the log full of Sybase data when (The transaction log in database EBILLS is almost full. Your transaction is being suspended until space is made available in the

  • sybase database configuration experience exchange 2010-06-25

    Sybase configuration parameters sp_configure 'max online engines', 4 go - Configure the number of boot cpu sp_configure 'number of engines at startup', 4 go - Configure the maximum memory number sp_configure 'max memory', 2097151 go - The largest all

  • Phone numbers attribution to the database (plain text) 2010-07-09

    Phone numbers attribution to the database (plain text): 239,917 records, including 186,187,188,189, etc.;

  • windows msysgit gui garbled text editor 2010-09-28

    windows msysgit gui garbled text editor When viewing the logs to see is always garbled, only the text in the options in accordance with the encoding settings look fine. Right in the git repository -> git gui -> Edit -> Options in the lower right