字符集轉(zhuǎn)換的exp/imp試驗(yàn)二
2024-07-21 02:34:05
供稿:網(wǎng)友
39. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c4.dmp fromuser=test touser=test ignore=y
5c4.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件;但是數(shù)據(jù)庫(kù)是換過(guò)的。
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是亂碼,實(shí)際上導(dǎo)入失敗。
40. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c4_2.dmp fromuser=test touser=test ignore=y
5c4_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的。
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是亂碼,實(shí)際上導(dǎo)入失敗。
41. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e1.dmp fromuser=test touser=test ignore=y
5e1.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,ASCII字符集是英文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是中文,實(shí)際上導(dǎo)入成功。
42. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e1_2.dmp fromuser=test touser=test ignore=y
5e1_2.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是換成中文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是???,實(shí)際上導(dǎo)入失敗。
43. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e2.dmp fromuser=test touser=test ignore=y
5e2.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,ASCII字符集是中文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是亂碼,實(shí)際上導(dǎo)入失敗。
44. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e2_2.dmp fromuser=test touser=test ignore=y
5e2_2.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是換成英文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是亂碼,實(shí)際上導(dǎo)入失敗。
45. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e3.dmp fromuser=test touser=test ignore=y
5e3.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,ASCII字符集是英文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是???,實(shí)際上導(dǎo)入失敗。
46. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e3_2.dmp fromuser=test touser=test ignore=y
5e3_2.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是換成中文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是???,實(shí)際上導(dǎo)入失敗。
47. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e4.dmp fromuser=test touser=test ignore=y
5e4.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是???,實(shí)際上導(dǎo)入失敗。
48. D機(jī)器是英文字符集,B機(jī)器是英文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e4_2.dmp fromuser=test touser=test ignore=y
5e4_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是換成英文的;
導(dǎo)入成功,沒(méi)有報(bào)錯(cuò)信息。
用英文客戶端SQL/PLUS訪問(wèn)8E,數(shù)據(jù)庫(kù)是中文,實(shí)際上導(dǎo)入成功。
四:向B的8c倒入操作(數(shù)據(jù)庫(kù)是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)),客戶機(jī)D是英文字符集
備注:客戶機(jī)是中文字符集的情況其實(shí)不用測(cè)試了,因?yàn)榭蛻魴C(jī)和服務(wù)器不一致,肯定出現(xiàn)問(wèn)題。
49. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c1.dmp fromuser=test touser=test ignore=y
5c1.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件;ASCII字符集是英文的
失敗
50. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c1_2.dmp fromuser=test touser=test ignore=y
5c1_2.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,ASCII字符集是改成中文的;
失敗
51. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c2.dmp fromuser=test touser=test ignore=y
5c2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,ASCII字符集是中文的;
失敗
52. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c2_2.dmp fromuser=test touser=test ignore=y
5c2_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是改成英文的;
失敗
53. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c3.dmp fromuser=test touser=test ignore=y
5c3.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,ASCII字符集是英文的;
成功。
54. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c3_2.dmp fromuser=test touser=test ignore=y
5c3_2.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是改成中文的;
失敗
55. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c4.dmp fromuser=test touser=test ignore=y
5c4.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件;但是數(shù)據(jù)庫(kù)是換過(guò)的。
失敗
56. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5c4_2.dmp fromuser=test touser=test ignore=y
5c4_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的。
失敗
57. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e1.dmp fromuser=test touser=test ignore=y
5e1.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,ASCII字符集是英文的;
成功。
58. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e1_2.dmp fromuser=test touser=test ignore=y
5e1_2.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是換成中文的;
失敗
59. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e2.dmp fromuser=test touser=test ignore=y
5e2.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,ASCII字符集是中文的;
失敗
60. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e2_2.dmp fromuser=test touser=test ignore=y
5e2_2.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是換成英文的;
失敗
61. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e3.dmp fromuser=test touser=test ignore=y
5e3.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,ASCII字符集是英文的;
失敗
62. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e3_2.dmp fromuser=test touser=test ignore=y
5e3_2.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是換成中文的;
失敗
63. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e4.dmp fromuser=test touser=test ignore=y
5e4.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的
失敗
64. D機(jī)器是英文字符集,B機(jī)器是中文轉(zhuǎn)換成的英文數(shù)據(jù)庫(kù)
imp system/manager@8c file=c:5e4_2.dmp fromuser=test touser=test ignore=y
5e4_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是換成英文的;
成功。
五:向B的8e倒入操作(數(shù)據(jù)庫(kù)是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)),客戶機(jī)D是中文字符集
備注:客戶機(jī)是英文字符集的情況其實(shí)不用測(cè)試了,因?yàn)榭蛻魴C(jī)和服務(wù)器不一致,肯定出現(xiàn)問(wèn)題。
65. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c1.dmp fromuser=test touser=test ignore=y
5c1.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件;ASCII字符集是英文的
失敗
66. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c1_2.dmp fromuser=test touser=test ignore=y
5c1_2.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,ASCII字符集是改成中文的;
失敗
67. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c2.dmp fromuser=test touser=test ignore=y
5c2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,ASCII字符集是中文的;
成功
68. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c2_2.dmp fromuser=test touser=test ignore=y
5c2_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是改成英文的;
失敗
69. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c3.dmp fromuser=test touser=test ignore=y
5c3.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,ASCII字符集是英文的;
失敗
70. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c3_2.dmp fromuser=test touser=test ignore=y
5c3_2.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是改成中文的;
成功
71. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c4.dmp fromuser=test touser=test ignore=y
5c4.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件;但是數(shù)據(jù)庫(kù)是換過(guò)的。
失敗
72. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5c4_2.dmp fromuser=test touser=test ignore=y
5c4_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的。
失敗
73. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e1.dmp fromuser=test touser=test ignore=y
5e1.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,ASCII字符集是英文的;
失敗
74. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e1_2.dmp fromuser=test touser=test ignore=y
5e1_2.dmp是英文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是換成中文的;
成功
75. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e2.dmp fromuser=test touser=test ignore=y
5e2.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,ASCII字符集是中文的;
失敗
76. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp sy stem/manager@8e file=c:5e2_2.dmp fromuser=test touser=test ignore=y
5e2_2.dmp是中文客戶端導(dǎo)出的英文數(shù)據(jù)庫(kù)文件,但是ASCII字符集是換成英文的;
失敗
77. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e3.dmp fromuser=test touser=test ignore=y
5e3.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,ASCII字符集是英文的;
失敗
78. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e3_2.dmp fromuser=test touser=test ignore=y
5e3_2.dmp是英文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是換成中文的;
失敗
79. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e4.dmp fromuser=test touser=test ignore=y
5e4.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的
成功
80. D機(jī)器是中文字符集,B機(jī)器是英文轉(zhuǎn)換成的中文數(shù)據(jù)庫(kù)
imp system/manager@8e file=c:5e4_2.dmp fromuser=test touser=test ignore=y
5e4_2.dmp是中文客戶端導(dǎo)出的中文數(shù)據(jù)庫(kù)文件,但是數(shù)據(jù)庫(kù)是換過(guò)的,但是ASCII字符集是換成英文的;
失敗
上面我的文筆可能有些不是很通順,但是我想這些記錄不是給一般人看的,是給有Oracle數(shù)據(jù)庫(kù)經(jīng)驗(yàn)的人看的,應(yīng)該看得懂。
有些試驗(yàn)其實(shí)可以不做,例如導(dǎo)出和導(dǎo)入時(shí)候假如客戶端和數(shù)據(jù)庫(kù)字符集不一致肯定出錯(cuò),還有5c1.dmp、5e2.dmp、5e3.dmp、5c4.dmp以及它們的修改ASCII字符集后的導(dǎo)出文件其實(shí)都是不可用的,
對(duì)它們進(jìn)行測(cè)試是沒(méi)有必要的。但是為了維護(hù)試驗(yàn)的完整性,我前面的實(shí)驗(yàn)做了,后面的試驗(yàn)就沒(méi)有寫(xiě)出來(lái)了。
后記:
/********************************
1:5C的測(cè)試
*********************************/
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
---------------------------------------------
AMERICAN_AMERICA.ZHS16GBK
SQL> Select substr('東北大學(xué)',1,2) from dual;
Select substr('東北大學(xué)',1,2) from dual
*
ERROR at line 1:
ORA-01756: quoted string not PRoperly terminated
SQL> SELECT VSIZE('男') FROM DUAL;
VSIZE('DP')
-----------
2
SQL>
SQL> SELECT length('男') FROM DUAL;
LENGTH('DP')
------------
2
SQL>
SQL> SELECT lengthb('男') FROM DUAL;
LENGTHB('DP')
-------------
2
/***************************
2:5E的測(cè)試
****************************/
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------
AMERICAN_AMERICA.US7ASCII
SQL> Select substr('東北大學(xué)',1,2) from dual;
SU
--
東
SQL> SELECT VSIZE('男') FROM DUAL;
VSIZE('男')
-----------
2
SQL>
SQL> SELECT length('男') FROM DUAL;
LENGTH('男')
------------
2
SQL>
SQL> SELECT lengthb('男') FROM DUAL;
LENGTHB('男')
-------------
2
/********************************
3:8C的測(cè)試
*********************************/
SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------
AMERICAN_AMERICA.US7ASCII
SQL> Select substr('東北大學(xué)',1,2) from dual;
SU
--
東
SQL> SELECT VSIZE('男') FROM DUAL;
VSIZE('男')
-----------
2
SQL>
SQL> SELECT length('男') FROM DUAL;
LENGTH('男')
------------
2
SQL>
SQL> SELECT lengthb('男') FROM DUAL;
LENGTHB('男')
-------------
2