blog.Toby

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            130 隨筆 :: 2 文章 :: 150 評論 :: 0 Trackbacks

           

          A Flat File Connection Manager will initially treat each column as a 50 character string by default. Leaving this default behavior will harm you when you go to an integer column into SQL Server or if your column contains more data than 50 characters. This Advanced page in the connection manager is the most important work you can do to ensure that all the data types for the columns are properly defined. You will also want to keep the data types as small as possible. If you have a zip code column for example that’s only 9 digits in length, define it as a 9 character string. Doing this will save an additional 41 bytes in memory multiplied by however many rows you have.

          A frustrating point with SSIS sometimes is how it deals with SQL Server data types. For example, a varchar maps in SSIS to a string column. It was made this way to translate well into the .Net development world and to make an agnostic product. The below table contains some of the common SQL Server data types and what they’re going to map to in a Flat File Connection Manager.

          SQL Server Data Type Flat File Connection Manager Data Type

          bigint

          eight-byte signed integer [DT_I8]
          binary byte stream [DT_BYTES]
          Bit Boolean [DT_BOOL]
          Date single-byte unsigned integer [DT_UI1]
          Datetime database timestamp [DT_DBTIMESTAMP]
          Decimal numeric [DT_NUMERIC]
          Float float [DT_R4]
          Int four-byte signed integer [DT_I4]
          Image image [DT_IMAGE]
          Nvarchar or nchar Unicode string [DT_WSTR]
          ntext

          Unicode text stream [DT_NTEXT]

          Numeric numeric [DT_NUMERIC]
          Smallint two-byte signed integer [DT_I2]
          Text text stream [DT_TEXT]
          Timestamp byte stream [DT_BYTES]
          Tinytint single-byte unsigned integer [DT_UI1]
          Uniqueidentifier unique identifier [DT_GUID]
          Varbinary byte stream [DT_BYTES]
          Varchar or char string [DT_STR]
          Xml Unicode string [DT_WSTR]
          posted on 2008-10-24 10:15 渠上月 閱讀(527) 評論(0)  編輯  收藏 所屬分類: OLAP
          主站蜘蛛池模板: 淮南市| 肇州县| 土默特右旗| 福鼎市| 武川县| 大化| 常熟市| 甘孜县| 娄烦县| 昌图县| 松溪县| 曲松县| 沧源| 板桥市| 阿荣旗| 广宁县| 临湘市| 乐昌市| 民县| 阆中市| 纳雍县| 郓城县| 化德县| 蒲城县| 莱西市| 阿勒泰市| 新安县| 长治市| 巫溪县| 枣强县| 贵定县| 吉林省| 蓬溪县| 都安| 铜鼓县| 凤冈县| 巴南区| 共和县| 繁昌县| 沐川县| 平南县|