問題情境:在多次輸入system錯誤密碼之後,會被提示,目前使用者被鎖定。甚至於更囧的是,連sys等其他使用者的密碼也記不得了。 解決思路:先解鎖,再為使用者重新設定密碼。 具體實現: (1)以sysdba身份登入,不需要提供使用者名稱和密碼,此sql深得我心。 conn / as sysdba ; (2)為使用者解鎖。 alter user system account unlock;
由於項目需要,需要尋找oracle表中的前幾條記錄,oralcle由一個rownum,可以直接用這個來得到需要的記錄數,但是一開始我用的sql是:select * from table where rownum< 你要查的記錄條數,雖然能夠取出前幾條記錄,但是我發現如果要把排序後記錄取前幾條結果就不對,即sql語句如下:select * from table where rownum<你要查的記錄條數 order by 欄位名 desc
處理超出開啟遊標的最大數異常(ORA-01000: maximum open cursors exceeded) ORA-01000_maximum_open_cursors_exceeded_ 在執行如下代碼時,經常會出現ora-01000: maximum open cursors exceeded異常 for(int i=0;i<balancelist.size();i++) { prepstmt =
SQL> startup ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/opt/oracle10g/product/10.2/db_1/dbs/initORA10G.ora' 尋找檔案,果然不存在。估計是非法關機造成的。
轉自於:http://www.jb51.net/article/19541.htm 關於 遊標 if,for 的例子 create or replace procedure peace_if is cursor var_c is select * from grade; begin for temp in var_c loop if temp.course_name = 'OS' then
準備資料: drop table test purge;create table test(id number,code varchar(20),name varchar(20));insert into test values(1,'201401','aaa');insert into test values(2,'201402','bbb');insert into test values(3,'201402','ccc');insert into test values(4,'2014
--1、在PLSql或者navicat等資料庫用戶端工具管理員賬戶下:建資料表空間create tablespace DEMO_TABLESPACE logging datafile 'D:\Oracle\database\tablespace\demo.dbf' size 100M autoextend on next 100M maxsize 500M extent management local;--2、建立使用者並授權CREATE USER demo_usename