oracle sqlplus exp相关命令

sqlplus连接oracle

tns文件配置
cd /usr/local/oracle/instantclient_11_2
mkdir -p network/admin
cd network/admin
新建tnsnames.ora文件
CM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.12.11)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
sqlplus连接数据库
sqlplus username/passwd@cm
或者
sqlplus /nolog
conn user/"pwd"@127.0.0.1:1521/orcl
或者
sqlplus user/"pwd"@127.0.0.1:1521/orcl
导出表命令:
导出指定表
exp 'crmreade/"Snsp@2018"'@10.13.190.193:1521/orcl file=/data/k3_1.dmp tables=K3P30.t_bd_material;

导出整个owner
exp 'crmreade/"Snsp@2018"'@10.13.190.193:1521/orcl file=/data/k3_1.dmp owner=K3P30;

赋值导出权限给用户
grant exp_full_database to crmreade;

上一篇:Sharding-Sphere使用HikariCP连接池连接Ojdbc6报Driver does not support get/set network timeout for connections


下一篇:Oracle DBMS占用大量内存的解决方法(注意一定要看,看完再改,不然改了参数,数据库运行不了)