1. 設定VMware設定Hard Disk時一定要大於20G,否則建立資料庫時會由於空間不夠導致失敗,此處設定為40G2. 安裝Oracle Linux 6在安裝OS 時選擇如下包:Base System > BaseBase System > Client management toolsBase System > Compatibility librariesBase System > Hardware monitoring utilitiesBase
說明: 在建立資料庫時輸入的密碼,是修改系統預設的密碼,以system和sysman等系統預設身份登入時要輸入的密碼就是修改後的密碼(建立資料庫時輸入的密碼)如果要建立新的使用者就必須以system或者sysman(這二者的許可權最大)的身份登入後才可建立建立使用者格式:create user 使用者名稱 identified by 密碼(例如:create user cht identified by
create or replace procedure p_tx_getfaxdata( )asv_ErrorCode NUMBER; -- 出錯的代碼v_ErrorMsg VARCHAR2(200); -- 錯誤的訊息顯示v_CurrentUser VARCHAR2(8); -- 當前資料庫使用者v_Information VARCHAR2(100); -- 關於錯誤的資訊begin //do the things you need to do.
[解決方案]1)通過尋找已被鎖定的資料庫表以及相關的sid,serial#,spid;select object_name,s.sid,s.serial#,p.spid from v$locked_object l,dba_objects o,v$session s,v$process p where l.object_id=o.object_id and l.session_id=s.sid and s.paddr=p.addr; 2)在資料庫中殺死Sessionalter system
oracle中使用on delete cascade和on delete set null來建立外鍵 其面我們介紹了建立外鍵約束時如果使用oracle預設的建立方式,在刪除被參照的資料時,將無法被刪除,這一點在oracle9i中給了我們更多靈活的選擇,我們可是使用on delete cascade和 on delete set null關鍵字來決定刪除被參照資料時是否要將參照這個資料的那些資料一併刪除,還是將那些參照這條資料的資料的對應值賦空。
SQL分頁預存程序///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////CREATE PROCEDURE [dbo].[sp_PageIndex]( -- Add the parameters for the stored procedure here @tblName varchar(50), -
今天寫oracle語句時發現一個奇怪的問題,糾結了很久沒有找到原因。求大牛解惑。問題精簡如下:select seq,info ,topic from system.help where seq in (select distinct seq from system.help where seq=20); -----(1)與 select seq,info ,topic from system.help where seq
在一般的情況下,使用批量fetch的幾率並不是很多,但是Oracle提供了這個功能我們最好能熟悉一下,說不定什麼時候會用上它。 以下是程式碼片段: declare cursor c1 is select * from t_depart; v_depart t_depart%rowtype ; type v_code_type is table of t_depart.depart_code%type ; v_code v_code_type ; type