blog.Toby

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            130 隨筆 :: 2 文章 :: 150 評(píng)論 :: 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 渠上月 閱讀(525) 評(píng)論(0)  編輯  收藏 所屬分類: OLAP
          主站蜘蛛池模板: 凤阳县| 得荣县| 长泰县| 麻城市| 营口市| 德钦县| 宜兴市| 武陟县| 曲麻莱县| 深泽县| 辛集市| 句容市| 柞水县| 武功县| 余江县| 乾安县| 绿春县| 通辽市| 凤城市| 红安县| 根河市| 淮滨县| 门源| 邵武市| 扶风县| 葫芦岛市| 永昌县| 阜城县| 临沭县| 绥阳县| 阿坝| 家居| 额尔古纳市| 崇信县| 伊宁市| 临潭县| 陕西省| 来宾市| 峨眉山市| 互助| 河池市|