ORACLE基本操作

2022-08-21 14:39:10 字數 2324 閱讀 7711

一、實驗目的

1.掌握oracle 10g相關服務的啟動和停止

2.熟練掌握資料庫配置助手(dba),企業管理器(oem),sql*plus與isql*plus等工具的使用

3.掌握使用startup和shuidown命令,同時了解使用oem和登錄檔中設定自動啟動、關閉資料庫的方法

二、實驗內容

1.使用「管理工具」中的服務視窗和dos命令來啟動1.4.3節中提到的oracle的幾種常見服務。

2.分別使用system使用者和sys使用者登入oem工具,程式組的sql*plus圖形視窗。

3.點選開始-》執行輸入cmd進入dos環境執行sqlplus命令登入資料庫,,並使用connect命令切換當前連線的使用者,具體操作如下:

(1)sqlplus system/密碼。

(2)sqlplus system/密碼主機字串

(3)sqlplus system/密碼@主機名:資料庫埠號/資料庫服務名

(4)connect system/密碼@主機字串as sysdba

(5)connect system/密碼@主機名:資料庫埠號/資料庫服務名as sysoper

4.以sys使用者的sysdba 特權登入資料庫,嘗試使用startup命令的不同方式啟動資料庫,並使用shutdown命令關閉資料庫

(1)sqlplus sys/密碼as sysdba

(2) shutdown immediate

(3) startup nomount|mount|open

觀察以不同方式啟動資料庫時提示資訊有何不同

三、實驗環境

windows7、oracle 10g

四、實驗步驟

(描述實驗步驟及中間的結果或現象。在實驗中做了什麼事情,怎麼做的,發生的現象和中間結果)

1、 使用管理工具下的服務視窗啟動常見服務

oracleservice服務

tnslistenner服務

isql*plus服務

oracledbconsole服務

使用dos命令啟動常見服務

2.分別使用system使用者和sys使用者登入oem工具,程式組的sql*plus圖形視窗。

3.點選開始-》執行輸入cmd進入dos環境執行sqlplus命令登入資料庫,,並使用connect命令切換當前連線的使用者,具體操作如下:

(1)sqlplus system/密碼。

(2)sqlplus system/密碼主機字串

(3)sqlplus system/密碼@主機名:資料庫埠號/資料庫服務名

(4)connect system/密碼@主機字串as sysdba

(5)connect system/密碼@主機名:資料庫埠號/資料庫服務名as sysoper

使用(4)(5)步驟登入:

4.以sys使用者的sysdba 特權登入資料庫,嘗試使用startup命令的不同方式啟動資料庫,並使用shutdown命令關閉資料庫

(1)sqlplus sys/密碼as sysdba

(2) shutdown immediate

(3) startup nomount|mount|open

觀察以不同方式啟動資料庫時提示資訊有何不同

Oracle基本操作

1.建立表空間 create tablespacetestdatafile c test.dbf size 10m 名字不要為數字 2.建立使用者 create user username identified by password 不要為數字 3.給使用者授權 grant dba to user...

Oracle 基本操作

在這裡詳述 oracle 基本操作。新增使用者 隨著使用者的建立,自動產生與使用者同名的schema create user tester profile default identified by tester default tablespace testdata temporary table...

oracle 基本操作

1 使用者登入 sqlplus 帳號 密碼 2 檢視當前登入使用者 show user 3 檢視所有的使用者 select username from all users 4 建立臨時表空間 create temporary tablespace test temp tempfile d oracl...