遇到的oracle問題

2021-06-18 08:04:45 字數 2173 閱讀 5761

1、表空間'user1'中無許可權

沒有把resource和connect 許可權賦給使用者,賦予許可權:grant resource,connect to 使用者名稱

2、超出表空間'user1'的空間限量

應該是你建立表的使用者在users表空間上的quota不足。

解決方法:

alter user scott quota 100m on ts1;

3、出現符號 "end-of-file"在需要下列之一時: 

; delete exists prior 

符號 ";" 被替換為 "end-of-file" 後繼續。

create or replace procedure sp3

(spsno integer) is

--type sp_talbe_type is table of

v_sno sc.sno%type;

v_sname student.sname%type;

v_cno sc.cno%type;

v_grade sc.grade%type;

-- index by binary_integer;

type sp_cursor_type is ref cursor;

-- sp_table sp_table_type;

sp_cursor sp_cursor_type;

begin

open sp_cursor for

select sc.sno,student.sname,sc.cno,sc.grade

from student,sc

where student.sno=sc.sno and sc.sno=spsno;

loop

fetch sp_cursor into v_sno,v_sname,v_cno,v_grade;

exit when sp_cursor%notfound;

dbms_output.put_line(v_sno||' 

'||v_sname||' 

'||v_cno||' 

'||v_grade);

end loop;

end;

解決辦法:最後一句要寫成 end sp3;

4、出現符號 "end"在需要下列之一時: 

; 符號 ";" 被替換為 "end" 後繼續。

create or replace procedure sp3

(spsno integer) is

--type sp_talbe_type is table of

v_sno sc.sno%type;

v_sname student.sname%type;

v_cno sc.cno%type;

v_grade sc.grade%type;

-- index by binary_integer;

type sp_cursor_type is ref cursor;

-- sp_table sp_table_type;

sp_cursor sp_cursor_type;

begin

open sp_cursor for

select sc.sno,student.sname,sc.cno,sc.grade

from student,sc

where student.sno=sc.sno and sc.sno=spsno;

loop

fetch sp_cursor into v_sno,v_sname,v_cno,v_grade;

exit when sp_cursor%notfound;

dbms_output.put_line(v_sno||' 

'||v_sname||' 

'||v_cno||' 

'||v_grade);

end loop

end sp3;

解決辦法:end loop後要加;

5、檢視oracle中的procedures

select 

object_name 

from 

user_procedures

select 

object_name 

from 

dba_procedures 

where 

owner= '使用者名稱 ';

使用Oracle遇到的問題

ora 00911 無效字元 這種情況經常是因為我sql語句後面多加了乙個 oracle 報錯ora 00904 識別符號無效 但是列名和表名沒有寫錯 一般情況下,識別符號錯誤是因為 語句中的列名在表中不存在,修改sql語句或者修改列名即可。但是如果建表語句寫成了 create table stud...

VC連線ORACLE遇到的問題

環境配置 vc 6.0 ado oracle9i winxp。問題 報出ora 12154 tns could not resolve service name的錯誤。以下是連線程式部分 開啟資料庫函式 bool cado opendb cstring m strpathname,cstring m...

oracle匯入dmp遇到的問題

一 首先要明白,匯入匯出dmp檔案是通過cmd命令執行的,而不是通過sql plus執行的.此外也可以借助plsqldev工具進行匯入匯出 記得 匯出可執行檔案 選擇客戶端安裝好的bin下的exp.exe工具 二 發現在匯出的過程有問題 網上查詢原因是說資料庫oracle服務端與客戶端版本存在問題,...