Several ways to access the database

Source: Internet
Author: User
Tags sqlplus

This part is very basic, but if not clear, to future study will have influence.
Sql> SELECT * from V$version where rownum=1;


BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production

1. Sqlplus Username/[email Protected]_service_name (This is accessed over the network)
C:\users\administrator>sqlplus Hr/[email protected]


Sql*plus:reLease 11.2.0.1.0 Production on Sunday May 17 01:14:04 2015


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

Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options
========================================================c:\users\administrator>sqlplus


Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 01:16:47 2015


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


Please enter user name: [email protected]
Enter Password:


Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options


Sql> exit
From Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options
Open
================================================================

C:\users\administrator>sqlplus/nolog


Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 01:17:17 2015


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


Sql> Conn Hr/[email protected]
is connected.


of course, you can also connect to the ezconnect database (Easy Connect):

CONNECT username/[email protected][:p Ort]/service_name[/instance_name]
CONNECT username/[email protected][//]host[:p ort]/service_name





If your connection does not successfully check the client \network\admin\Sqlnet.oraUnder
Sql> SELECT * from V$version where rownum=1;


BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production


Add Ezconnect:
NAMES. Directory_path= (Tnsnames,ezconnect)
The following simulation does not add Ezconnect:

Server-side removal by simulation\network\admin\Sqlnet.ora in NAMES. Directory_path Parameters Ezconnect, the client can still be connected through ezconnect, which I am not too clear, I hope to have friends to share.

2.

[Email protected] ~]$ Sqlplus hr/hr
Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 02:12:05 2015
Copyright (c) 1982, Oracle. All rights reserved.
Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options


3.
[Email protected] ~]$ Sqlplus Sys/manager as Sysdba
Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 02:12:49 2015
Copyright (c) 1982, Oracle. All rights reserved.
Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options

4.
[Email protected] ~]$ Sqlplus
Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 02:13:45 2015
Copyright (c) 1982, Oracle. All rights reserved.
Please enter user name: HR
Enter Password:
Connect to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options

5.
[Email protected] ~]$ Sqlplus/nolog
Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 02:15:09 2015
Copyright (c) 1982, Oracle. All rights reserved.
Sql> Connect hr/hr
is connected.
Sql> exit
From Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-production
With the partitioning, OLAP, Data Mining and Real application testing options Disconnect
[Email protected] ~]$ Sqlplus/nolog
Sql*plus:release 11.2.0.1.0 Production on Sunday May 17 02:15:40 2015
Copyright (c) 1982, Oracle. All rights reserved.
Sql> Connect Sys/manager as Sysdba
is connected.

This method starts the Sqlplus and then connects to the database via connect.


6. With tools or third-party tools provided by Oracle:
SQL developer, PL/developer,toad,spotlight ....
This is all very simple if the database is connected via the network.

The above concise introduction of these methods, but did not list all, for example, there are:
Hostname,ldap,nis and other methods, interested can be self-experiment.



Several ways to access the database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.