用sqlplus操做數據庫的基本步驟:sql
#su - oracle數據庫
$sqlplus / as sysdbaoracle
>!ps -ef|grep ora #查看oracle進程,看看oracle是否已經啓動,若是未啓動則使用下面這條語句啓動.ide
>startup #啓動oracle數據庫。附,關閉爲shutdown [imediate]spa
>conn username/password #如conn hr/123456。 若是提示用戶已經被鎖,或想要修改用戶密碼,則執行下面這三條語句blog
>conn / as sysdba進程
>alert user username identified by password account unlock;get
>conn userneme/passwordchannel
>#如今能夠輸入你要執行的SQL語句了grep