最近公司要將sqlserver數據遷移到oracle,因為原來sqlserver裡表和字段的名字都很長,所以在oracle執行時報標識符過長,有沒有什麼好的解決辦法,因為是一個完整的數據庫所以表很多還有很多存儲過程,我的oracle字符集貌似是UTF-8的,求大神幫忙啊....
oracle中表明、列明、標識列字符不能超過30個。
1.Names must be from 1 to 30 bytes long with these exceptions:
◦Names of databases are limited to 8 bytes.
◦Names of database links can be as long as 128 bytes.
If an identifier includes multiple parts separated by periods, then each attribute can be up to 30 bytes long. Each period separator, as well as any surrounding double quotation marks, counts as one byte. For example, suppose you identify a column like this:
"schema"."table"."column"
The schema name can be 30 bytes, the table name can by 30 bytes, and the column name can be 30 bytes. Each of the quotation marks and periods is a single-byte character, so the total length of the identifier in this example can be up to 98 bytes.
可以試著先從sqlserver修改好過長的數據,其實工作量也不大,自已建一個文檔,把修改點記錄下來,在換成oracle數據庫後,同時修改程序。