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语句的两端使用三个双引号