Use the doscommand line to connect to the oracle database in WINDOWS.

Source: Internet
Author: User

Use the doscommand line to connect to the oracle database in WINDOWS.

How can I connect to the Oracle database with the prompt (cmd.exe) of the computer?

Doscommand line connection to oracle Database

Assume that an Oracle database has the following information:

IP: 192.168.0.1

SID: orcl

Port: 1521

Username: testuser

Password 123456

The service name configured in the local client is server1.

1. Connect to the database by service name

Sqlplus userName/userPassword @ netServiceName

For example, sqlplus testuser/123456 @ server1

2. Connect to the database through IP Address:

Sqlplus userName/userPassword @ // IP: port/SID

For example, sqlplus testuser/123456 @ // 192.168.0.1: 1521/orcl

After the command is entered, the yellow part is displayed, indicating that the database has been connected.

Oracle service operations

Enable Service

Net start oracleservicebinbo

Open listener

Lsnrctl start

Disable the server

Net stop oracleservicebinbo

Close listener

Lsnrctl stop

The preceding operations are performed to connect to the oracle database through the windows doscommand line and enable or disable the oracle service.

Related Article

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.