|
报错现象:
[oracle@localhost ~]$ expdp wj/wj@sztech directory=dpdata1 dumpfile=exp.dmp tables=student
Export: Release 11.2.0.4.0 - Production on Fri Dec 21 17:04:06 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
UDE-12526: operation generated ORACLE error 12526
ORA-12526: TNS:listener: all appropriate instances are in restricted mode
查看监听
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 21-DEC-2018 16:59:31
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 04-APR-2018 09:47:04
Uptime 261 days 7 hr. 12 min. 27 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
Service "sztech" has 1 instance(s).
Instance "sztech", status RESTRICTED, has 1 handler(s) for this service...
Service "sztechXDB" has 1 instance(s).
Instance "sztech", status RESTRICTED, has 1 handler(s) for this service...
The command completed successfully
原来之前改字符集时执行了:ALTER SYSTEM ENABLE RESTRICTED SESSION;
解决办法:
[oracle@localhost ~]$ export ORACLE_SID=sztech
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 21 17:21:58 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
System altered.
验证:
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 21-DEC-2018 17:22:06
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 04-APR-2018 09:47:04
Uptime 261 days 7 hr. 35 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status RESTRICTED, has 1 handler(s) for this service...
Service "sztech" has 1 instance(s).
Instance "sztech", status READY, has 1 handler(s) for this service...
Service "sztechXDB" has 1 instance(s).
Instance "sztech", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost ~]$
|
|