有用戶問到這樣一個問題,在進行導出操作時如何轉義口令中的@符號?由于缺省的Oracle會將@符號后面的字串當作服務名來解析,所以不加處理是不行的。有的企業因為安全規則的需要,口令中都會加入@符號。
假定用戶口令如下: SQL> alter user eygle identified by "eygle@com";
User altered.
如果缺省導出會出現如下錯誤: [oracle@jumper oracle]$ exp eygle/eygle@com file=eygle.dmp tables=test
Export: Release 9.2.0.4.0 - PRoduction on Fri Jan 4 11:17:48 2008Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
EXP-00056: ORACLE error 12154 encounteredORA-12154: TNS:could not resolve service nameEXP-00000: Export terminated unsuccessfully
通過轉義,可以成功導出: [oracle@jumper oracle]$ exp eygle//"eygle@com/" file=eygle.dmp tables=test
Export: Release 9.2.0.4.0 - Production on Fri Jan 4 11:12:10 2008Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning optionJServer Release 9.2.0.4.0 - ProductionExport done in ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path .... . exporting table TEST 4136 rows exported
-The End-
新聞熱點
疑難解答