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.