set echo on;
Master Note
for Oracle XML Database (XDB) Install / Deinstall (文档 ID 1292089.1)
connect / as sysdba
set pagesize 1000
col comp_name format a36
col version format a12
col status format a8
col owner format a12
col object_name format a35
col name format a25
-- Check status of XDB
select comp_name, version, status
from dba_registry
where comp_id = 'XDB';
(select * from v$option)
-- Check for invalid objects
select owner, object_name, object_type, status
from dba_objects
where status = 'INVALID'
and owner in ('SYS', 'XDB');
spool off;
step1 install
xdb
select tablespace_name from dba_tablespaces;
SQL>
select tablespace_name,SEGMENT_SPACE_MANAGEMENT from dba_tablespaces;
TABLESPACE_NAME SEGMEN
------------------------------ ------
SYSTEM MANUAL
SYSAUX AUTO
UNDOTBS1 MANUAL
TEMP MANUAL
USERS AUTO
MAXIMO AUTO
RBS AUTO
RBSBIG AUTO
TOOLS AUTO
@?/rdbms/admin/catqm.sql andrew123 USERS TEMP YES
@?/rdbms/admin/utlrp.sql
@ ?/rdbms/admin/catnacl.sql
@ ?/rdbms/admin/dbmsnacl.sql
@ ?/rdbms/admin/prvtnacl.plb
Log db as sysdba
BEGIN
DBMS_NETWORK_ACL_ADMIN.create_acl (
acl=> 'NOR754S_SENDMAIL.xml',
description=> 'EMAIL_SEND',
principal=> 'SYS',
is_grant=> TRUE,
privilege=> 'connect',
start_date=> SYSTIMESTAMP,
end_date=> NULL);
COMMIT;
END;
/
Run the following
SQL AS sysdba:
spool
/home/ora11g/NOR754S.sql
select
'BEGIN' ||chr(10)||
' DBMS_NETWORK_ACL_ADMIN.add_privilege (
'||chr(10)||
' acl=>
'||'''NOR754S_SENDMAIL.xml'''||', '||chr(10)||
' principal=>'''||upper(username)||''','||chr(10)||
' is_grant=> TRUE, '||chr(10)||
' privilege=> '||'''connect'','||chr(10)||
' position=> NULL, '||chr(10)||
' start_date=> SYSTIMESTAMP,'||chr(10)||
' end_date=> NULL);'||chr(10)||
' END;'||chr(10)||
'/'||chr(10)
from dba_users
where account_status='OPEN'
and username
not in('SYS');
spool off
!
---then run
sqlplus /as sysdba
@/home/ora11g/NOR754S.sql
---to add other user
Only one ACL can be assigned to a specific
host and port-range combination. Assigning a new ACL to a specific host and
port-range results in the deletion of the previous assignment. You must take
care when making a new assignment that you are not opening ports that were
closed by a previous ACL assignment, or you could be opening yourself to attack.
When wildcard usage causes overlapping assignments, the most specific
assignment will take precedence, so an ACL assigned to 192.168.2.3:80 takes
precedence over once assigned to 192.168.2.* etc. Run the following sql:
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl=> 'NOR754S_SENDMAIL.xml',
host=> '9.xxx.xxx.19', ----邮件服务器IP
lower_port=>24433, -----指定端口号
upper_port=> NULL);
COMMIT;
END;
/
Step4 :add other
user to acl
sqlplus -s / as sysdba < set termout off
set heading off
set pagesize 0
set verify off
set echo off
step5: assign act to network
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21754115/viewspace-776676/ ,如需转载,请注明出处,否则将追究法律责任。