最近有時間學(xué)習(xí)oracle了,把學(xué)習(xí)的過程整理出來,漫漫學(xué)習(xí)路,現(xiàn)在才剛剛起步。
創(chuàng)新互聯(lián)主要從事網(wǎng)站設(shè)計、成都網(wǎng)站制作、網(wǎng)頁設(shè)計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)豐滿,十年網(wǎng)站建設(shè)經(jīng)驗,價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18980820575
1.#su - oracle
2.啟動監(jiān)聽
$ lsnrctl start
3.啟動em
$ emctl start dbconsole
http://192.168.88.139:1158/em/
4.啟動iSQL*Plus
$ isqlplusctl start
http://192.168.88.139:5560/isqlplus/
5.連接數(shù)據(jù)庫
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 22 07:01:37 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
6.啟動數(shù)據(jù)庫
SQL> startup;
7.創(chuàng)建用戶bob,密碼admin
SQL>create user bob identified by admin;
8.把dba權(quán)限給bob
SQL>grant dba to bob;
9.取消授權(quán)
SQL>revoke dba from bob;
10.刪除用戶,如果用戶已經(jīng)有對象了(如TABLE,VIEW等)需要帶cascade
SQL>drop user bob cascade;
11.刪除 ORACLE表空間
SQL>drop tablespace tablespacename including contents and datafiles;
12.解鎖oracle用戶bob
SQL>show user;
USER is "SYS"
SQL>alter user bob account unlock;
SQL> conn bob/qazwsx;
Connected.
SQL> show user;
USER is "BOB"