oracle 11g https://localhost:1158/em 无法访问 & 设置自增id

没有发现本地主机文件夹,OC4JConfigurationissue.C:\app\Administrator\product\11.2.0\dbhome_1/oc4j/j2ee
/OC4J_DBConsole_PC-201004271039.jnyuchai.com_orcl not found..

(1)复制一份j2ee/OC4J_DBConsole_HOSTNAME_orcl文件夹,重命名为OC4J_DBConsole_PC-201004271039.jnyuchai.com_orcl,

(2)复制一份db_1下的HOSTNAME_orcl文件夹,重命名为PC-201004271039.jnyuchai.com_orcl。

(3)最后重新启动dbconsole,服务启动成功

执行:

$ set ORACLE_HOSTNAME=localhost
$ set ORACLE_UNQNAME=orcl
$ emctl status dbconsole

显示Oracle Enterprise Manager 11g is running。但是在浏览器中输入https://localhost:1158/em,此站点的连接不安全

https 变成 http
执行 $ emctl unsecure dbconsole
然后 $ emctl start dbconsole

http 变成 https
执行 $ emctl secure dbconsole
然后 $ emctl start dbconsole

 

///////////////////////////////////////

-- 创建序列
create sequence SEQ_K_DATASOURCE
increment by 1 -- 每次递增1
start with 1 -- 从1开始
nomaxvalue -- 没有最大值
minvalue 1 -- 最小值=1
NOCYCLE; -- 不循环

create or replace trigger trig_K_DATASOURCE
before insert on k_datasource for each row
begin
select SEQ_K_DATASOURCE.nextval into :new.id from dual;
end;
/
alter trigger trig_K_DATASOURCE enable;
/

posted @ 2022-06-24 23:00  李小加  阅读(655)  评论(0编辑  收藏  举报