標籤:1、查看系統配置遊標數select value from v$parameter where name = ‘open_cursors‘;2、查看遊標使用方式select o.sid, osuser, machine, count(*) num_cursfrom v$open_cursor o, v$session swhere user_name = ‘XFTEST‘ and o.sid=s.sidgroup by o.sid, osuser, machineorder by num_
標籤:select * from v$sqlarea t order by t.LAST_ACTIVE_TIME desc注意 :執行此語句等等一些相關的語句 必須具有DBA 的許可權 雖然這條語句很普通 但是需要的時候很管用 能夠及時查出一個人執行sql語句情況-------oracle 查看已經執行過的sql 這些是存在共用池中的 --------->select * from v$sqlarea t order by t.LAST_ACTIVE_TIME desc----------
標籤:一、涉及內容1.理解觸發器的概念、作用和類型。2.練習觸發器的建立和使用。二、具體操作(實驗) 1.利用觸發器對在scott.emp表上執行的DML操作進行安全性檢查,只有scott使用者登入資料庫後才能向該表中執行DML操作。(第1題中,user是系統函數,返回目前使用者。字串中使用兩個單引號表示一個單引號。)要求:分別以system使用者和scott使用者對emp 表執行DML操作,實驗觸發器的運行效果。(1)在scott使用者下建立觸發器語句:create or
標籤: ORACLE視圖添加備忘 著作權聲明:本文為博主原創文章,未經博主允許不得轉載。 create or replace view oes_material_series_ref asselect t.productgroup, o.idnrk materialcode, t.seriescode from oes_park_priority t inner join oms_hm_mtl_general_view v
標籤:11g版本之前設定:sga_target11g版本設定:memory_target(自動分配sga和pga大小)查看記憶體當前記憶體大小:SQL> show parameter sgaSQL>show parameter memory_target語句:alter system set memory_target=4g scope=spfile;
標籤:需要用一個geoserver 與 oracle結合來顯示gis資訊結果在顯示圖層的時候,tomcat中報錯經過查詢資料,需要建立空間索引而建立索引的時候並不知道該怎麼命名,在哪些列上建立。最後發現應該這樣寫命令CREATE INDEX tablename_idx ON tablename(coloum that include gis information) INDEXTYPE IS MDSYS.SPATIAL_INDEX 第一次運行顯示name is still
標籤:--Oracle:DECLARE n_count int;begin Select count(*) into n_count from from M_Test where ENTITYLSH = 1; dbms_output.put_line(n_count); end; --sql server:declare @is_exist_alert3 int;Select @is_exist_alert3=count(*) from M_Test where ENTITYLSH = 1
標籤:常用的字串彙總(拼接)函數介紹1.WMSYS.WM_CONCAT 從oracle 10G開始支援,使用案例如下: select deptno,wmsys.wm_concat(ename) from emp group by deptno; 若想將字元之間的分隔字元換成其他標點,可添加一個replace函數 select
標籤:步驟:1.建立序列 2.建立觸發器。文法解析:create sequence TB_CODE_SEQUENCEminvalue 1maxvalue 999999999999999999999999999start with 11increment by 1cache 10;CREATE OR REPLACE TRIGGER tb_code_Increase BEFORE insert ON tb_code FOR EACH ROW begin