oracle10g的學習環境搭建

1.下載oracle10g

2.安裝

爲避免麻煩安裝前配置好oracle服務器ip,如果安裝後再改ip,可能會出現在其他機器上不能訪問的問題,那就要修改oracle配置文件了

安裝時oracle數據庫實例爲orcl默認,密碼admin

3.安裝成功後,開啓測試用戶:scott

cmd-> sqlplus sys/admin as sysdba;

>alter user scott account unlock;

>alter user scott identity by tiger;

> grant connect,resource to scott;

>exit

4.然後在任何機器上可以通過http://xxxxx:5560/isqlplus來訪問,也可以在本機通過sqlplus來登錄

用戶名:scott 密碼:tiger 數據庫標識:orcl

5.也可以用em方式來登錄管理,http://xxxxx:1158/em,oracle11g不提供isqlplus的方式訪問,用em替代,但是我安裝了oracle11g後其他機器上通過em的方式訪問失敗,原因未明。

6.新建用戶(拷貝自http://blog.csdn.net/a332897696/article/details/5542729)

根據自己的需要修改下面的模板即可

創建臨時表空間

create temporary tablespace test_temp

tempfile'E:/oracle/product/10.2.0/oradata/testserver/test_temp01.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

 

創建數據表空間

create tablespace test_data

logging

datafile'E:/oracle/product/10.2.0/oradata/testserver/test_data01.dbf'

size 32m

autoextend on

next 32m maxsize 2048m

extent management local;

 

創建用戶並指定表空間

create user username identified by password

default tablespace test_data

temporary tablespace test_temp;

 

給用戶授予權限grant connect,resource to username;

 

以後以該用戶登錄,創建的任何數據庫對象都屬於test_temp test_data表空間,這就不用在每創建一個對象給其指定表空間了。

發佈了46 篇原創文章 · 獲贊 26 · 訪問量 26萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章