SQLServer2005數據庫到Oracle數據庫的遷移,需要注重的是Oracle的數據類型和SQLServer的數據類型是不一樣的,可以在SQLServer下運行:
SELECT*
FROMmsdb.dbo.MSdatatype_mappings
SELECT*
FROMmsdb.dbo.sysdatatypemappings
來查看SQLServer和其他數據庫系統的數據類型對應關系。第一個SQL語句是看SQL轉Oracle的類型對應,而第二個表則更具體得顯示了各個數據庫系統的類型對應。
ORACLE bigint NUMBER 19 3 1Oracle binaryBLOB NULL 0 1
Oracle binary RAW -1 4 1
Oracle bit NUMBER 1 3 1
Oracle char CHAR -1 4 1
Oracle char CLOB NULL 0 1
Oracle char VARCHAR2 -1 4 1
Oracle datetime DATE NULL 0 1
Oracle decimal NUMBER -1 3 1
Oracle doubleprecision FLOAT NULL 0 1
Oracle float FLOAT NULL 0 1
Oracle image BLOB NULL 0 1
Oracle int NUMBER 10 3 1
Oracle money NUMBER 19 3 1
Oracle nchar
NCHAR -1 4 1
Oracle ncharNCLOB NULL 0 1
Oracle ntext NCLOB NULL 0 1
Oracle numeric NUMBER -1 3 1
Oracle nvarchar NCLOB NULL 0 1
Oracle nvarchar NVARCHAR2 -1 4 1
Oracle nvarchar(max) NCLOB NULL 0 1
Oracle real REAL NULL 0 1
Oracle smalldatetime DATE NULL 0 1
Oracle smallint NUMBER 5 3 1
Oracle smallmoney NUMBER 10 3 1
Oracle sysname NVARCHAR2 128 4 1
Oracle text CLOB NULL 0 1
Oracle timestamp RAW 8 4 1
Oracle tinyint NUMBER 3 3 1
Oracle uniqueidentifIEr CHAR 38 4 1
Oracle varbinary BLOB NULL 0 1
Oracle varbinary RAW -1 4 1
Oracle varbinary(max) BLOB NULL
0 1
Oracle varchar CLOB NULL 0 1
Oracle varchar VARCHAR2 -1 4 1
Oracle varchar(max) CLOB NULL 0 1
Oracle XML NCLOB NULL 0 1
Oracle bigint NUMBER 19 3 1
Oracle binary BLOB NULL 0 1
Oracle binary RAW -1 4 1
Oracle bit NUMBER 1 3 1
Oracle char CHAR -1 4 1
Oracle char CLOB NULL 0 1
Oracle char VARCHAR2 -1 4 1
Oracle datetime DATE NULL