zoukankan      html  css  js  c++  java
  • 关于SSIS中代码页(Code Page) 相关错误

    今天我也遇到这个问题了,真坑爹!让boss说我低能 55555.。。

    The column “xxxx” cannot be processed because more than one code page (1252 and 936) are specified for…

    网上有云:

                  将某控件的属性AlwaysUseDefaultCodePage设置为true,DefaultCodePage也应为936

                  就可解决

    我试了一下 根本不允许设置

    后来才发现

    与sql server中Collation的设置有关

    sql server不同语言的版本在创建数据库时,会默认不同的Collation设置

    这才是根本

    -----------------------------------------------------------------------------------------------------

    CREATE DATABASE TestCollation
    go
    USE TestCollation
    go
    SELECT DATABASEPROPERTYEX('TestCollation', 'Collation')
    -- the default for us english without changes at the windows layer or changes during SQL Server install is:
    -- SQL_Latin1_General_CP1_CI_AS
    -- To force it use:
    -- CREATE DATABASE TestCollation
    -- COLLATE SQL_Latin1_General_CP1_CI_AS

    go
    -- To see the list of collations use the system function
    SELECT * FROM ::fn_helpcollations()
    go

    -- Since this started from a question on how can I CHANGE collations here's how.
    -- Let's change the collation to a case sensitive collation...

    ALTER DATABASE TestCollation COLLATE Latin1_General_CS_AS_KS_WS
    go

    -- Confirm the change?
    SELECT DATABASEPROPERTYEX('TestCollation', 'Collation')
    go

    -- Create some objects
    CREATE TABLE dbo.Test
    ( Col1 int  NOT NULL)
    go

    CREATE TABLE dbo.test
    ( Col1 int  NOT NULL)
    go

    CREATE TABLE dbo.TEST
    ( Col1 int  NOT NULL)
    go

    -- Now try to change back to case insensitive...
    ALTER DATABASE TestCollation COLLATE SQL_Latin1_General_CP1_CI_AS
    go

    -- This will generate these helpful messages:
    -- Server: Msg 1505, Level 16, State 1, Line 1
    -- CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID 2. Most significant primary key is 'test'.
    -- Server: Msg 3436, Level 16, State 1, Line 1
    -- Cannot rebuild index for the 'sysobjects' table in the 'TestCollation' database.
    -- Server: Msg 5072, Level 16, State 1, Line 1
    -- ALTER DATABASE failed. The default collation of database 'TestCollation' cannot be set to
    SQL_Latin1_General_CP1_CI_AS.

    -- To see the server's setting
    sp_helpsort

    -- To see the database's setting
    sp_helpdb TestCollation

    -- To see the table's setting (for each column)
    sp_help Test

     -------------------------------------------------------------------------------------------------

  • 相关阅读:
    iOS9 News 应用
    swift中,Optional、?与!之间的关系
    [翻译] CotEditor
    [book] iOS 8 Swift Programming Cookbook
    便利的操作plist文件
    消除 Xcode7 中 directory not found for option 'xxxx' 警告
    点击单个cell高度变化的动画效果
    [翻译] LiquidFloatingActionButton
    一脸懵逼学习Zookeeper(动物园管理员)---》高度可靠的分布式协调服务
    一脸懵逼学习基于CentOs的Hadoop集群安装与配置(三台机器跑集群)
  • 原文地址:https://www.cnblogs.com/zcm123/p/2592169.html
Copyright © 2011-2022 走看看