Oracle PLSQL包安装
这里有人知道如何在Oracle11g中安装PLSQL包吗 我尝试使用以下两个软件包:Oracle PLSQL包安装,oracle,plsql,oracle11g,Oracle,Plsql,Oracle11g,这里有人知道如何在Oracle11g中安装PLSQL包吗 我尝试使用以下两个软件包: DBMS\u网络\u ACL\u管理员 DBMS_网络_ACL_实用程序 我使用的是Oracle Application Express,到目前为止SQL无法识别这些 谢谢。为DBMS\u NETWORK\u ACL\u ADMIN安装PLSQL包 您可以先检查它们是否存在,然后以用户sys的身份运行此命令: select * from dba_objects where name = ... 如果它们
select *
from dba_objects
where name = ...
如果它们在Oracle RDBMS上不存在(我不知道express edition是否排除了它们,但这似乎不合逻辑),那么您的数据库安装得不好。最简单的方法是重新安装数据库。在这种情况下,您不需要更换软件,只需要创建一个新的数据库
高级方法是重新安装部分数据字典。如果您以前从未这样做过,则可以假定数据库最终将损坏。您可以尝试执行实例?/dbs/catqm.sql
替换?通过ORACLE_HOME所在的路径,然后是rdbms/admin。例如Linux上的$ORACLE_HOME/rdbms/admin。请记住为其他用户关闭数据库
维护ACL
额外的评论导致了ACL缺失的结论。这是我用来在包中维护它们的方法。请小心,即使是11.2.0.3也有一个坏习惯,即尽管采取了预防措施,但在ACL维护时经常会中断已连接用户的会话
警告!此脚本允许访问1和32767之间的所有端口。您可能希望将此限制为应用程序的适用端口。为了便于使用,我将所有32K端口都粘贴在这里。
--
-- When ORA-24247 errors continue despite creation of a network ACL,
-- first remove the ACL fully as user SYS using:
--
-- begin
-- dbms_network_acl_admin.drop_acl('/sys/acls/invantive-producer.xml');
-- end;
--
-- This occurs incidentally on Oracle 11g R1.
--
prompt Create Access Control Lists.
declare
l_principal varchar2(30) := upper('&&itgen_user_owner_login');
l_acl varchar2(300);
l_acl_full_path varchar2(300);
l_dummy pls_integer;
--
-- To temporary disable this code, sometimes it causes installation
-- issues.
--
l_skip_acl_maintenance boolean := false;
--
-- To temporarily disable granting the ACL access.
--
l_skip_acl_grants boolean := false;
begin
l_acl := 'invantive-producer.xml';
l_acl_full_path := '/sys/acls/' || l_acl;
--
if not l_skip_acl_maintenance
then
--
-- Drop superfluous network ACLs for users and roles that no longer exist.
--
-- Dropping network ACLs is tricky. Queries on the view dba_network_acls
-- often lead to ORA-600. This query seems to work reliable on Oracle 11g R1.
--
-- First delete all ACL privileges for which no ACL exists.
-- During this, we will ignore problems.
--
for r in
( select nae.acl
, nae.principal
from dba_network_acl_privileges nae
where nae.principal
not in
( select usr.username
from dba_users usr
union all
select rle.role
from dba_roles rle
)
)
loop
begin
dbms_network_acl_admin.delete_privilege
( r.acl
, r.principal
);
dbms_output.put_line('Dropped superfluous ACL ' || r.acl || ' for ' || r.principal || '.');
exception
when others
then
dbms_output.put_line('Ignoring error ' || sqlerrm);
end;
end loop;
--
-- Then try another time, not ignoring problems.
--
for r in
( select nae.acl
, nae.principal
from dba_network_acl_privileges nae
where nae.principal
not in
( select usr.username
from dba_users usr
union all
select rle.role
from dba_roles rle
)
)
loop
dbms_network_acl_admin.delete_privilege
( r.acl
, r.principal
);
dbms_output.put_line('Dropped superfluous ACL ' || r.acl || ' for ' || r.principal || '.');
end loop;
--
-- Now create new network ACL when it does not yet exist.
--
begin
select 1
into l_dummy
from resource_view rvw
where rvw.any_path = l_acl_full_path
;
dbms_output.put_line('ACL ' || l_acl || ' already present. No action.');
exception
when no_data_found
then
dbms_network_acl_admin.create_acl
( acl => l_acl
, description => 'Normal Access by Invantive Producer'
, principal => 'SYS'
, is_grant => true
, privilege => 'connect'
, start_date => null
, end_date => null
);
dbms_network_acl_admin.assign_acl
( acl => l_acl
, host => '*'
, lower_port => 1 /* ATTENTION! You may want to tighten this! */
, upper_port => 32767 /* ATTENTION! You may want to tighten this! */
);
dbms_output.put_line('Created ACL ' || l_acl || ' for port 1 till 32767.');
end;
else
dbms_output.put_line('Skipped maintenance of Access Control Lists.');
end if;
--
if not l_skip_acl_grants
then
--
-- Update the privilges for the ACL when not correct.
--
for r_usr
in
( select l_principal principal
from dual
union all
--
-- Any unspecified Invantive schema.
--
-- For SYS, itgen_schemas_r can contain multiple rows.
--
select sma_r.name principal
from itgen_schemas_r sma_r
)
loop
begin
select 1
into l_dummy
from dba_network_acl_privileges nae
where nae.acl = l_acl_full_path
and nae.principal = r_usr.principal
and nae.privilege = 'connect'
and nae.is_grant = 'true'
and nae.invert = 'false'
and nae.start_date is null
and nae.end_date is null
;
dbms_output.put_line('Connect privileges already granted to ' || l_principal || '. No action.');
exception
when no_data_found
then
dbms_network_acl_admin.add_privilege
( acl => l_acl
, principal => l_principal
, is_grant => true
, privilege => 'connect'
, start_date => null
, end_date => null
);
dbms_output.put_line('Connect privileges granted to ' || l_principal || '.');
end;
end loop;
--
commit;
else
dbms_output.put_line('Skipped grants of Access Control Lists.');
end if;
end;
/
警告2!ACL的维护可以是非常重要的,并且可能会导致安全风险(在Oracle的第11版之前,我们已经接受了这一点:-)。如有疑问,请联系系统管理员或网络管理员。
--
-- When ORA-24247 errors continue despite creation of a network ACL,
-- first remove the ACL fully as user SYS using:
--
-- begin
-- dbms_network_acl_admin.drop_acl('/sys/acls/invantive-producer.xml');
-- end;
--
-- This occurs incidentally on Oracle 11g R1.
--
prompt Create Access Control Lists.
declare
l_principal varchar2(30) := upper('&&itgen_user_owner_login');
l_acl varchar2(300);
l_acl_full_path varchar2(300);
l_dummy pls_integer;
--
-- To temporary disable this code, sometimes it causes installation
-- issues.
--
l_skip_acl_maintenance boolean := false;
--
-- To temporarily disable granting the ACL access.
--
l_skip_acl_grants boolean := false;
begin
l_acl := 'invantive-producer.xml';
l_acl_full_path := '/sys/acls/' || l_acl;
--
if not l_skip_acl_maintenance
then
--
-- Drop superfluous network ACLs for users and roles that no longer exist.
--
-- Dropping network ACLs is tricky. Queries on the view dba_network_acls
-- often lead to ORA-600. This query seems to work reliable on Oracle 11g R1.
--
-- First delete all ACL privileges for which no ACL exists.
-- During this, we will ignore problems.
--
for r in
( select nae.acl
, nae.principal
from dba_network_acl_privileges nae
where nae.principal
not in
( select usr.username
from dba_users usr
union all
select rle.role
from dba_roles rle
)
)
loop
begin
dbms_network_acl_admin.delete_privilege
( r.acl
, r.principal
);
dbms_output.put_line('Dropped superfluous ACL ' || r.acl || ' for ' || r.principal || '.');
exception
when others
then
dbms_output.put_line('Ignoring error ' || sqlerrm);
end;
end loop;
--
-- Then try another time, not ignoring problems.
--
for r in
( select nae.acl
, nae.principal
from dba_network_acl_privileges nae
where nae.principal
not in
( select usr.username
from dba_users usr
union all
select rle.role
from dba_roles rle
)
)
loop
dbms_network_acl_admin.delete_privilege
( r.acl
, r.principal
);
dbms_output.put_line('Dropped superfluous ACL ' || r.acl || ' for ' || r.principal || '.');
end loop;
--
-- Now create new network ACL when it does not yet exist.
--
begin
select 1
into l_dummy
from resource_view rvw
where rvw.any_path = l_acl_full_path
;
dbms_output.put_line('ACL ' || l_acl || ' already present. No action.');
exception
when no_data_found
then
dbms_network_acl_admin.create_acl
( acl => l_acl
, description => 'Normal Access by Invantive Producer'
, principal => 'SYS'
, is_grant => true
, privilege => 'connect'
, start_date => null
, end_date => null
);
dbms_network_acl_admin.assign_acl
( acl => l_acl
, host => '*'
, lower_port => 1 /* ATTENTION! You may want to tighten this! */
, upper_port => 32767 /* ATTENTION! You may want to tighten this! */
);
dbms_output.put_line('Created ACL ' || l_acl || ' for port 1 till 32767.');
end;
else
dbms_output.put_line('Skipped maintenance of Access Control Lists.');
end if;
--
if not l_skip_acl_grants
then
--
-- Update the privilges for the ACL when not correct.
--
for r_usr
in
( select l_principal principal
from dual
union all
--
-- Any unspecified Invantive schema.
--
-- For SYS, itgen_schemas_r can contain multiple rows.
--
select sma_r.name principal
from itgen_schemas_r sma_r
)
loop
begin
select 1
into l_dummy
from dba_network_acl_privileges nae
where nae.acl = l_acl_full_path
and nae.principal = r_usr.principal
and nae.privilege = 'connect'
and nae.is_grant = 'true'
and nae.invert = 'false'
and nae.start_date is null
and nae.end_date is null
;
dbms_output.put_line('Connect privileges already granted to ' || l_principal || '. No action.');
exception
when no_data_found
then
dbms_network_acl_admin.add_privilege
( acl => l_acl
, principal => l_principal
, is_grant => true
, privilege => 'connect'
, start_date => null
, end_date => null
);
dbms_output.put_line('Connect privileges granted to ' || l_principal || '.');
end;
end loop;
--
commit;
else
dbms_output.put_line('Skipped grants of Access Control Lists.');
end if;
end;
/
也许你们应该回复,而不是给出-1s.:/Oracle APEX,还是Oracle 11g Express Edition?您试图以哪个用户的身份执行包,您会遇到哪些错误?这可能是权限问题,而不是安装问题;我相信这两个版本都必须明确授予权限-如果每个人都有访问权限,他们就不会给平台增加太多安全性。是的,它是11g express版,我还没有遇到任何错误,我知道我不知道如何在我的数据库中安装它们,帐户类型是workspace administrator,问题是我无法从移动应用程序请求数据库上的POST方法,为此,我必须创建访问控制列表(ACL)以授予主机权限。。我被困在这里,非常糟糕:(那他们为什么要在这方面提供RESTful服务?如果我不能使用它们?没有意义..在评论中确定它是Enterprise Edition的APEX,而不是Express Edition。用户没有这些服务的执行权限(强大)虽然软件包似乎比不存在的软件包更有可能。它们看不到
dba\u对象\u ae
,所以可能也看不到dba\u对象
,并且可能不会有这些软件包。但我仍然不相信它们需要它们。啊,好吧,我在阅读是的11g速成版后没有阅读所有15条评论,我还没有遇到任何错误
,最初的问题是这里的任何人都知道如何在oracle 11g中安装PLSQL包
。是的,当它在EE上运行时,它可能缺少一个非驱动用户的特权。将添加一些示例。您没有详细阅读所有注释!?是的,我最终放弃了,并删除了大部分我的。我仍然在等待一个mod来删除整个评论线程…哇…甚至在删除大部分评论后有20条评论…我似乎stackoverflow是一个真正的大数据平台:-)