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
          主站蜘蛛池模板: 镇原县| 九台市| 尉氏县| 土默特右旗| 龙陵县| 蒲江县| 长宁区| 萍乡市| 拜城县| 穆棱市| 利川市| 尚志市| 寿光市| 定兴县| 桂阳县| 昌吉市| 泽普县| 铁力市| 富裕县| 全南县| 永城市| 宜黄县| 九江县| 霸州市| 台北市| 玉树县| 泸州市| 长葛市| 临朐县| 依安县| 湟源县| 泸水县| 漳平市| 张掖市| 荥阳市| 水富县| 拜泉县| 武汉市| 芒康县| 安泽县| 丰县|