oracle 12C数据库操作记录


Connecting to 192.168.211.128:22...
Connection established.
Escape character is '^@]'.

Last login: Fri Jul 12 09:19:10 2013 from 192.168.211.1
[root@hlg ~]# su - oracle
[oracle@hlg ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 12-JUL-2013 09:28:26

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hlg)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                12-JUL-2013 09:14:11
Uptime                    0 days 0 hr. 14 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /12c/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File         /12c/diag/tnslsnr/hlg/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hlg)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ora12c" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@hlg ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jul 12 10:30:55 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name;

CON_NAME
------------------------------
CDB$ROOT
SQL> alter pluggable database pdb01 close;

Pluggable database altered.

SQL> alter pluggable database pdb01 open;     

Pluggable database altered.

SQL> alter pluggable database pdb01 close immediate;

Pluggable database altered.

SQL> alter session set container=pdb01;

Session altered.

SQL> show conn_name;
SP2-0158: unknown SHOW option "conn_name"
SQL> show con_name;

CON_NAME
------------------------------
PDB01
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@hlg ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.1.0 - Production on 12-JUL-2013 11:07:51

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hlg)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.1.0.1.0 - Production
Start Date                12-JUL-2013 09:14:11
Uptime                    0 days 1 hr. 53 min. 44 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /12c/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File         /12c/diag/tnslsnr/hlg/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hlg)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "ora12c" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
Service "ora12cXDB" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
Service "pdb01" has 1 instance(s).
  Instance "ora12c", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@hlg ~]$ sqlplus sys/dragon@pdb01 as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jul 12 11:08:05 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

^CERROR:
ORA-12170: TNS:Connect timeout occurred


[oracle@hlg ~]$ vi /12c/product/12.1.0/db_1/network/admin/tnsnames.ora 
[oracle@hlg ~]$ sqlplus sys/dragon@pdb01 as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Fri Jul 12 11:17:56 2013

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> show con_name;

CON_NAME
------------------------------
PDB01
SQL>    

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/726309/viewspace-766121/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/726309/viewspace-766121/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值