oracle12c

Modifying PLSQL function to return multiple rows from same column

时光毁灭记忆、已成空白 提交于 2020-02-06 12:34:19
问题 I am a beginner PLSQL user, and I have what might be a rather simple question. I have created the following SQL Function, which returns the created date of the process whose corporate ID matches the corporate ID that I have given it. I have this connected to my JDBC, and it returns values just fine. However, I just realized I overlooked an important issue--it's entirely possible that more than one process will have a corporate ID that matches the ID value I've inputted, and in cases like that

ODP.NET Managed Driver has no OracleDbType.Object, what's the equivalent?

ぐ巨炮叔叔 提交于 2020-02-06 07:43:31
问题 I want to upgrade some ODP .NET code (Oracle 11 unmanaged driver) to the managed one from Oracle 12. But the code does not compile because there is no such thing as OracleDbType.Object any more. And I need to handle user-defined types coming back to .NET, as well as ref cursors of objects. According to Oracle: https://docs.oracle.com/cd/E48297_01/doc/win.121/e41125/OracleDbTypeEnumerationType.htm#i1017320 "Not Available in ODP.NET, Managed Driver" Is there some suggested way to handle these?

ODP.NET Managed Driver has no OracleDbType.Object, what's the equivalent?

↘锁芯ラ 提交于 2020-02-06 07:43:10
问题 I want to upgrade some ODP .NET code (Oracle 11 unmanaged driver) to the managed one from Oracle 12. But the code does not compile because there is no such thing as OracleDbType.Object any more. And I need to handle user-defined types coming back to .NET, as well as ref cursors of objects. According to Oracle: https://docs.oracle.com/cd/E48297_01/doc/win.121/e41125/OracleDbTypeEnumerationType.htm#i1017320 "Not Available in ODP.NET, Managed Driver" Is there some suggested way to handle these?

PL SQL For Loop Sys_RefCursor

你离开我真会死。 提交于 2020-02-02 03:14:08
问题 I'm using Oracle 12c. In PL/SQL I can do this set serveroutput on declare begin for x in (select 1 as y from dual) loop dbms_output.put_line(x.y); end loop; end; I can also do this... set serveroutput on declare cursor c1 is select 1 as y from dual; begin for x in c1 loop dbms_output.put_line(x.y); end loop; end; So far, so good. But can I do this with a sys_refcursor? I am aware I could do it with a fetch/while loop but prefer the for loop syntax (I think it is a lot cleaner)... set

创建一个虚拟机安装Windows -server-2019服务器系统以及安装Oracle12(非常详细!!!)

我的未来我决定 提交于 2020-02-01 15:02:30
相信对于很多计算机专业人士来说虚拟机并不陌生,今天就写一篇虚拟机下安装软件的演示文章送给所需要的小白。 一丶虚拟机安装包以及系统镜像和Oracle12c安装包的下载(都是官网下载,也可找其他路径下载) 1.本次使用的虚拟机是VMware Workstation Pro15.0版本 下载地址: 下载链接 下载完安装即可 2.本次安装使用的是Windows -server-2019版本 下载地址: 下载链接 选择ISO下载 3.本次安装使用的是Oracle12c版本 下载地址: 下载链接 好了到此为止我们的第一步准备工作已经完成。 二丶创建虚拟机 1.创建新的虚拟机 2.自定义下一步 3.默认下一步 4.可以先安装镜像文件,但是我这里建议大家稍后安装,然后下一步 5.因为我们装的微软的Windows系统所以选择Microsorf Windows,版本是Windows server 2016,因为软件没更新出来,实际上我们用的是2019版,然后点击下一步 6.虚拟机名称自己起,位置也可自己调整,然后下一步 7.这里选择BIOS,然后下一步 8.两个选项都可根据自己电脑定,由于我这里是演示,所以是2,1默认,然后下一步 9.根据自己宿机定(建议2GB),演示所以我选默认,然后下一步 10.三种网络连接(建议刚开始学使用网络地址转换),然后下一步 11.默认,下一步 12.选择创建虚拟磁盘

Oracle 11g and 12c on same windows machine, 12c listener fails to start

允我心安 提交于 2020-01-26 03:39:06
问题 I have a windows machine with Oracle 11g already installed on it and ORACLE_HOME pointing to the home of 11g. I then tried installing 12c. While installing, the installer asked me to unset the environment variable and re-run the installer. I did that. Then the installation worked fine. Just one hiccup was when the installer went on for net configuarion, it failed. I did a 'retry' and it completed successfully. When the installation was completely done, I found that the oracle database service

How to include Java functions(and external libraries too) in Oracle PL\SQL?

徘徊边缘 提交于 2020-01-23 12:37:26
问题 I've a function in Java that uses an external library (jackson) to work with JSON structures. How can I include my function and all its dependencies in Oracle(12c) PL\SQL? The DB host is an unix os. 回答1: You need to compile your project as fat jar. It means a jar that includes its dependencies on it. Using with zip opener, you can open a fatjar and find jar dependencies in parent fatjar. After you create your project on unix os which your db runs on go to jar path and run the code below $ >

How to include Java functions(and external libraries too) in Oracle PL\SQL?

一世执手 提交于 2020-01-23 12:37:09
问题 I've a function in Java that uses an external library (jackson) to work with JSON structures. How can I include my function and all its dependencies in Oracle(12c) PL\SQL? The DB host is an unix os. 回答1: You need to compile your project as fat jar. It means a jar that includes its dependencies on it. Using with zip opener, you can open a fatjar and find jar dependencies in parent fatjar. After you create your project on unix os which your db runs on go to jar path and run the code below $ >

External table truncates trailing whitespace while reading from file

房东的猫 提交于 2020-01-16 05:35:34
问题 I'm trying to load the file contents to an external table. While doing this, trailing spaces are truncated. 'CREATE TABLE ' || rec.ext_table_name || ' (ROW_DATA VARCHAR2(4000)) ORGANIZATION EXTERNAL ' || '(TYPE ORACLE_LOADER DEFAULT DIRECTORY ' || rec.dir_name || ' ACCESS ' || 'PARAMETERS (RECORDS ' || 'DELIMITED by NEWLINE NOBADFILE NODISCARDFILE ' || 'FIELDS REJECT ROWS WITH ALL NULL FIELDS (ROW_DATA POSITION(1:4000) char)) LOCATION (' || l_quote || 'temp.txt' || l_quote || ')) REJECT LIMIT

Oracle 12.2 - Replacement of NOPARTITION feature

两盒软妹~` 提交于 2020-01-14 22:54:32
问题 I have Oracle version 12.2.0.1.0 We have generic script which create sequence that need to be reuse for different objects (by renaming sequence name): CREATE SEQUENCE NAME_SEQ MINVALUE 1 MAXVALUE 999999999 INCREMENT BY 1 START WITH 100 CACHE 200 NOORDER NOCYCLE NOPARTITION ; This script isn't working with below error until I remove NOPARTITION : ORA-00933: SQL command not properly ended I found in AskTom that the NOPARTITION is not supported in 12.2 there's been various of things in previous