一次使用简单连接连接Oracle数据库的测试,方法如下:
格式为:
connect username/password@ip:listener_port/service_name
[xie@11g2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Feb 5 19:32:11 2019
Copyright © 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user;
USER is “SYS”
SQL> select table_name from dba_tables where owner=‘DSG’;
TABLE_NAME
TB1
TBS2
DSG_TB1
BB
PART_RANGE1
PART_RANGE2
PART_RANGE3
PART_RANGE9
8 rows selected.
SQL> CONNECT dsg/dsg@192.168.0.152:1521/orcl.example.com
Connected.
SQL> show user;
USER is “DSG”
SQL> select table_name from dba_tables where owner=‘DSG’;
TABLE_NAME
TB2
TB1
CHECK_TAB_DIFFDSG
CHECK_TAB_LISTDSG
SQL>