1. Oracle Installation
Please refer to the following link for more information: http://wenku.baidu.com/view/d01ffd43336c1eb91a375d68.html.
2. Use the command line sqlplus to connect to Oracle
(1) Check the listening status
C: \> LSNRCTL status
LSNRCTL for 32-bit windows: Version 9.2.0.1.0-production on 2005 11:01:01
Copyright (c) 1991,200 2, Oracle Corporation. All rights reserved.
Connecting to (description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
TNS-12541: TNS: No listener
TNS-12560: TNS: protocol adapter error.
TNS-00511: No listener
32-bit Windows Error: 61: Unknown error
Connecting to (description = (address = (Protocol = IPC) (Key = extproc0 )))
TNS-12541: TNS: No listener
TNS-12560: TNS: protocol adapter error.
TNS-00511: No listener
32-bit Windows Error: 2: no such file or directory
If the preceding information is displayed, the listener is not started.
(2) Start the listener
C: \> LSNRCTL start
LSNRCTL for 32-bit windows: Version 9.2.0.1.0-production on 2005 11:01:36
Copyright (c) 1991,200 2, Oracle Corporation. All rights reserved.
Start tnslsnr: Please wait...
Tnslsnr for 32-bit windows: Version 9.2.0.1.0-Production
The system parameter file is F: \ oracle \ ora92 \ Network \ admin \ listener. ora.
Logs written to F: \ oracle \ ora92 \ Network \ log \ listener. Log
Listener :( description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
Listener :( description = (address = (Protocol = IPC) (pipename = \. \ PIPE \ extproc0ipc )))
Connecting to (description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
Listener status
------------------------
Alias listener
Version tnslsnr for 32-bit windows: Version 9.2.0.1.0-Production
Commencement Date: 28-6-2005 11:01:38
Normal operation time 0 days 0 hours 0 minutes 2 seconds
Tracking level off
Security off
SNMP off
Listener parameter file F: \ oracle \ ora92 \ Network \ admin \ listener. ora
Listener log file F: \ oracle \ ora92 \ Network \ log \ listener. Log
Listener endpoint overview...
(Description = (address = (Protocol = TCP) (host = oyez) (Port = 1521 )))
(Description = (address = (Protocol = IPC) (pipename = \. \ PIPE \ extproc0ipc )))
(3) connecting to the database
C: \> sqlplus \ nolog
SQL * Plus: Release 9.2.0.1.0-production on Tuesday June 28 11:05:27 2005
Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.
SQL>ConnUser/password @ orclAs sysdba // user and password are your facial usernames and passwords, such as sys/123456
Error:
ORA-12500: TNS: Listeners cannot start dedicated server processes
SQL> exit;
Cause: the service corresponding to the local database is not opened. In the service, the service corresponding to oracleu is opened.
(4) connecting to the database
E: \>Sqlplus/nolog
SQL * Plus: Release 9.2.0.1.0-production on Tuesday June 28 11:17:53 2005
Copyright (c) 1982,200 2, Oracle Corporation. All rights reserved.
SQL>ConnUser/password @ oradbAs sysdba
Connected.
SQL>
3. Connect to Oracle through built-in SQL * Plus
Use SQL * Plus
When you connect to the database, a dialog box appears asking you to enter the username, password, and host string information. The first two do not need to be said, they will fill in the correct, but this host string does not know what it means, you can only find out through the information, in fact, this string is automatically generated during the installation of Oracle, it is the name of the configured Database Connection Service.
The global database names set during installation are the same. The default value is orcl. Therefore, you should enter the host string orcl as sysdba during connection.
Use sys as the user name, password as the password, sysdba as the connection identity to log on or connect to SQL * Plus, enter the User name: SYS, password: Password, host string: orcl as sysdba
If the host string is entered incorrectly, an error will always be reported.