1. Connecting Conn
1.1 Login to the system with Oracle user, enter Sqlplus environment, log in Administrator mode
1Oracle@yas:~>Sqlplus/Nolog2Sql*Plus:release11.2.0.1.0Production onTue Feb2 -: -: + .3Copyright (c)1982, the, Oracle. Allrights reserved.4Sql>ShowUser;5 USER is ""6Sql>Conn/ asSYSDBA7 Connected.8Sql>ShowUser;9 USER is"SYS"
1.2 Normal USER Login conn User/password
1 SQL> conn T1/T12Connected. 3 SQL>user; 4 USER is "T1"
2. Disconnect Disc
1 SQL> disc2fromDatabase11.2. 0.1. 0 - 3bit Productionwith andReal Application Testing Options
3. Change Password PASSW
1 SQL> passw2 for T13oldpassword: #输入原密码 4new password: #新密码 5Retype New password: #再输入一次新密码 6 Password changed
4. Show the current user show users;
1 SQL> conn T1/T12Connected. 3 SQL>user; 4 USER is "T1"
5. Exit the exit port connection to the current database and exit Sqlplus
1 SQL>exit2fromDatabase11.2. 0.1. 0 - 3bit Productionwith andReal Application Testing Options
6. View the database version
1Sql> Select * fromv$version;2 3 BANNER4 --------------------------------------------------------------------------------5OracleDatabase11g Enterprise Edition Release11.2.0.1.0 -64bitProduction6Pl/SQL Release11.2.0.1.0 -Production7CORE11.2.0.1.0Production8Tns forLinux:version11.2.0.1.0 -Production9Nlsrtl Version11.2.0.1.0 -Production
7. Start/Close instance, open is startup, shut down why is shutdown immediate? The normal shutdown time is longer.
Shutdown--normal shutdown (waits for all users to disconnect before shutting down)
Shutdown immediate--Recommended (force the user to disconnect immediately after executing the current SQL)
Sql> shutdownImmediateDatabaseclosed.Databasedismounted. ORACLE instance shut down. SQL>Startuporacle instance started. Total System Global Area576221184bytesfixed Size2215464bytesvariable Size432013784bytesDatabaseBuffers138412032Bytesredo Buffers3579904bytesDatabasemounted.DatabaseOpened.
8. View executed commands list\l Here is the only one because the database has just been restarted.
1 SQL> l2 1*Select from V$session
Two sqlplus common commands-Basic version