1. exp/imp
oracle 用戶密碼中包含特殊字符時,使用exp/imp備份或恢復數據時會報錯
EXP-00056: ORACLE error 12154 encountered ORA-12154: TNS:could not resolve the connect identifier specified EXP-00000: Export terminated unsuccessfully
linux系統下:
密碼用一對雙引號, 整體用對單引號括住
exp '用戶名/"密碼"@sid' file=文件 full=y
windows系統下:
密碼前後分別用三個雙引號括住
exp 用戶名/"""密碼"""@sid file=文件 full=y
2. 用戶連接
密碼用雙引號括住即可
3. exp Query
Linux:
exp scott/tiger tables=emp query=\"where job=\'SALESMAN\' and sal\<1600\"
Windows:
exp userid=tkyte/tkyte tables=t query="""where object_id < 5000"""
在windows中,需要在WHERE語句的兩端使用三個雙引號