conn username/password@servicename
作者:互联网
conn username/password 方式连接的时候,会碰到这样的错误问题
ERROR: ORA-00942: table or view does not exist Error accessing PRODUCT_USER_PROFILE Warning: Product user profile information not loaded! You may need to run PUPBLD.SQL as SYSTEM 解决方法: 需要使用system用户登陆并执行pupbld.sql脚本,不能用SYSDBA。
每个人安装目录不同,可能pupbld.sql位置不确定,你可以locate pupbld.sql 查找一下。
oracle@prd:/home/oracle/impdir$sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 00:14:52 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> conn system/abc123456
Connected.
SQL>@/u01/oracle/product/11.2.0/sqlplus/admin/pupbld.sql
.....
.....
1、conn username/password@servicename //连接某实例
oracle@prd:/home/oracle/impdir$sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 00:14:52 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> conn sh3/ab123@fp Connected.
//这里fp是servicename
SQL> conn sh3/abc123@fp3 //我故意把fp写错,注意fp就是在tnsnames.ora里面设置的
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Warning: You are no longer connected to ORACLE.
2、conn system/Shfpbi //连接某账户
oracle@prd:/home/oracle/impdir$sqlplus /nolog SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 00:14:52 2022 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> conn shfpfpmai/Shfpbi12@fpmai Connected. SQL> conn sh3/abc123@fpmai2 ERROR: ORA-12154: TNS:could not resolve the connect identifier specified Warning: You are no longer connected to ORACLE.
3、导入导出
expdp sh3/abc123 dumpfile=SH3.dmp directory=EXPDIR logfile=sh3export.log impdp sh3/abc123 dumpfile=SH3.dmp directory=IMPDIR logfile=sh3import.log
标签:username,sqlplus,sh3,pupbld,servicename,SQL,oracle,password,conn 来源: https://www.cnblogs.com/aozhejin/p/16032959.html