tnsname方式
[oracle@ora12c ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 22 18:57:31 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> alter system register; System altered. SQL> exit [oracle@ora12c ~]$ tnsping pdb TNS Ping Utility for Linux: Version 12.1.0.1.0 - Production on 22-JUL-2013 19:04:26 Copyright (c) 1997, 2013, Oracle.  All rights reserved. Used parameter files: 
/oracle/12c/db1/network/admin/sqlnet.ora 
Used TNSNAMES adapter to resolve the alias 
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = pdborcl12c))) 
OK (0 msec) 
[oracle@ora12c ~]$ sqlplus awen/oracle@pdb SQL*Plus: Release 12.1.0.1.0 Production on Mon Jul 22 19:01:12 2013 Copyright (c) 1982, 2013, Oracle.  All rights reserved. Last Successful login time: Mon Jul 22 2013 18:58:03 +08:00 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 
------------------------------ 
PDBORCL12C 
SQL> exit