ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.1.0/db_1
?
Enter the full pathname of the local bin directory:[/usr/local/bin]:
Copyingdbhome to /usr/local/bin ...
Copyingoraenv to /usr/local/bin ...
Copyingcoraenv to /usr/local/bin ...
?
?
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file asneeded by
Database Configuration Assistant when a database iscreated
Finished running generic part of root script.
Now product-specific root actions will beperformed.
[root@Ora12c database]#
?
?

?

?
?
?
?
?
?
三. 查询数据库信息
?
?
[oracle@Ora12c ~]$ sqlplus / as sysdba
?
SQL*Plus: Release 12.1.0.1.0 Production on Thu Apr24 12:00:39 2014
?
Copyright (c) 1982, 2013, Oracle. All rights reserved.
?
?
Connected to:
Oracle Database 12c Enterprise Edition Release12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics andReal Application Testing options
?
SQL> set lin 140
SQL> select * from v$version;
?
BANNER CON_ID
------------------------------------------------------------------------------------------
OracleDatabase 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production 0
PL/SQLRelease 12.1.0.1.0 - Production 0
CORE 12.1.0.1.0 Production 0
TNSfor Linux: Version 12.1.0.1.0 - Production 0
NLSRTLVersion 12.1.0.1.0 - Production 0
?
SQL> SELECT CDB FROM V$DATABASE;
?
CDB
---
YES
?
SQL> select PDB_NAME,CON_UID,pdb_id,status fromdba_pdbs;
?
PDB_NAME CON_UID PDB_ID STATUS
-------------------- ---------- -----------------------
PDBCNDBA 426143573 3 NORMAL
PDB$SEED 4088301206 2 NORMAL
?
?
SQL> select con_id,dbid,NAME,OPEN_MODE fromv$pdbs;
?
CON_ID DBID NAME OPEN_MODE
---------- ---------- ----------------------------------------
24088301206 PDB$SEED READ ONLY
3 426143573 PDBCNDBA READ WRITE
?
?
SQL> show con_name
?
CON_NAME
------------------------------
CDB$ROOT
?
SQL> alter session set container=pdbcndba;
?
Session altered.
?
SQL> show con_name
?
CON_NAME
------------------------------
PDBCNDBA
?
SQL> show con_name
?
CON_NAME
------------------------------
PDBCNDBA
?
SQL> create table cndba as select * fromall_users;
Table created.
?
SQL> alter session set container=CDB$ROOT;
Session altered.
?
SQL> select count(1) from cndba;
select count(1) from cndba
*
ERROR at line 1:
ORA-00942: table or view does not exist
?
?
?
?
?
--------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
?
About Dave:
--------------------------------------------------------------------------------------------
QQ: 251097186
Email: tianlesoftware@gmail.com
Blog: http://blog.csdn.net/tianlesoftware
Weibo: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
Linkedin: http://cn.linkedin.com/in/tianlesoftware