Oracle

Oracle - Create an index only if not exists

半城伤御伤魂 提交于 2021-02-08 14:38:28
问题 Is there any way to create indexes in oracle only if they don't exists ? Something like CREATE INDEX IF NOT EXISTS ord_customer_ix ON orders (customer_id); 回答1: Add an index only if not exists: declare already_exists exception; columns_indexed exception; pragma exception_init( already_exists, -955 ); pragma exception_init(columns_indexed, -1408); begin execute immediate 'create index ord_customer_ix on orders (customer_id)'; dbms_output.put_line( 'created' ); exception when already_exists or

Oracle - Create an index only if not exists

让人想犯罪 __ 提交于 2021-02-08 14:38:06
问题 Is there any way to create indexes in oracle only if they don't exists ? Something like CREATE INDEX IF NOT EXISTS ord_customer_ix ON orders (customer_id); 回答1: Add an index only if not exists: declare already_exists exception; columns_indexed exception; pragma exception_init( already_exists, -955 ); pragma exception_init(columns_indexed, -1408); begin execute immediate 'create index ord_customer_ix on orders (customer_id)'; dbms_output.put_line( 'created' ); exception when already_exists or

How can I use Windows authentication in MVC but use the newer identity database tables for role storage?

我们两清 提交于 2021-02-08 13:56:19
问题 I'm using MVC 5 and Windows authentication, and need to use role management in a database, not AD groups. I've used the asp.net membership solution to do this in the past but would prefer to use the more modern identity table(s). I do not have access to AD groups. How can this be done? 回答1: Personally I would skip the ASP.NET Identity part and just do it using a custom Authorization filter. Historically the lines between Authentication (Can you prove who you are) and Authorization (What are

ORA-01438: value larger than specified precision allows for this column

给你一囗甜甜゛ 提交于 2021-02-08 12:22:10
问题 We get sometimes the following error from our partner's database: <i>ORA-01438: value larger than specified precision allows for this column</i> The full response looks like the following: <?xml version="1.0" encoding="windows-1251"?> <response> <status_code></status_code> <error_text>ORA-01438: value larger than specified precision allows for this column ORA-06512: at "UMAIN.PAY_NET_V1_PKG", line 176 ORA-06512: at line 1</error_text> <pay_id>5592988</pay_id> <time_stamp></time_stamp> <

ORA-01438: value larger than specified precision allows for this column

a 夏天 提交于 2021-02-08 12:18:49
问题 We get sometimes the following error from our partner's database: <i>ORA-01438: value larger than specified precision allows for this column</i> The full response looks like the following: <?xml version="1.0" encoding="windows-1251"?> <response> <status_code></status_code> <error_text>ORA-01438: value larger than specified precision allows for this column ORA-06512: at "UMAIN.PAY_NET_V1_PKG", line 176 ORA-06512: at line 1</error_text> <pay_id>5592988</pay_id> <time_stamp></time_stamp> <

ORA-06550: line 1, column 7: PLS-00201: identifier 'PAYMENT_UPDATE' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored

扶醉桌前 提交于 2021-02-08 11:57:25
问题 I have a procedure to insert values into one table and update rows of another table. The procedure compiled without any errors. If I manually call it within PL/SQL codes, the tables are updated. CREATE OR REPLACE PROCEDURE payment_update (bId IN number, pType IN varchar2, pAmt IN number ) AS BEGIN INSERT INTO payment VALUES (PID_SEQ.NEXTVAL, bId, pType, (SELECT CURRENT_DATE FROM DUAL), pAmt); UPDATE booking SET payment_status = 'FP', paid = pAmt WHERE booking_id = bId; END; / I am trying to

在.NetCore(C#)中使用ODP.NET Core+Dapper操作Oracle数据库

試著忘記壹切 提交于 2021-02-08 11:55:03
前言 Oracle 关系数据库系统是目前世界上流行的关系数据库管理系统,系统可移植性好、使用方便、功能强,适用于各类大、中、小、微机环境。它是一种高效率、可靠性好的 适应高吞吐量的数据库解决方案。 现在的系统主要的技术栈是Java / .Net Core,Java方面不必说对Oracle支持肯定没问题,.Net Core很少会使用到 Oracle数据库。 目前我现开发的项目是.Net Core与 Oracle 数据库, 所以我想到用.Net Core来写个Oracle数据库访问层,可以方便的使用Oracle的数据和存储过程。 ODP.NET Core是一个ADO.NET驱动程序,提供从Microsoft .NET Core客户端到Oracle数据库的快速数据访问。它可以在Windows和Linux上运行。ODP.NET由一个100%托管代码动态链接库Oracle.ManagedDataAccess.dll组成,可通过NuGet安装获得。 这个 Oracle.ManagedDataAccess.Core 是真的方便,不用安装Oracle客户端,兼容性、便捷性,开箱即用。 简单使用 首先用nuget安装这个 Oracle.ManagedDataAccess.Core ,之后就可以执各类操作了,不过从代码量上看还是比较繁琐的,上代码: var connStr = $"DATA

Our developers are getting below error for “PGA aggregate limit” only for xml datatype

时间秒杀一切 提交于 2021-02-08 11:49:39
问题 Below is the error stack. I have tried increasing PGA aggregate limit but no luck. it is only happening with xml datatype. ================================================================================================================================================================================================================== driver stacktrace: Exception in thread "main" org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 79.0 failed 4 times, most recent

oracle Select dates for items sold within 1 minute of each other

谁说我不能喝 提交于 2021-02-08 11:45:25
问题 Oracle 12c database. I have a car sales table: CREATE TABLE CAR_SALES ( NUM_CARS NUMBER(10,0), EQUIPMENT_TYPE VARCHAR2(100), LOCATION VARCHAR2(500), SOLD_DATE DATE ) ; --Insert sample data insert into car_sales (num_cars,equipment_type,location,sold_date) values ('8','Rovers','coventry','07-SEP-19 10:00:12'); insert into car_sales (num_cars,equipment_type,location,sold_date) values ('1','Rovers','coventry','07-SEP-19 10:00:45'); insert into car_sales (num_cars,equipment_type,location,sold

高项真题及解析:信息系统项目管理师2020年11月上午真题及答案解析

落花浮王杯 提交于 2021-02-08 11:24:14
点击领取>>>软考 16本 电子版官方教材 & 36本 辅导教材 + 27套 官方真题冲刺卷 + 21套 必考知识点6G资料包 2020 下半年信息系统项目管理师上午真题及答案 1 、( )使系统的描述及信息模型的表示与客观实体相对应,符合人们的思维习惯,有利于系统开发过程中用户与开发人员的交流和沟通。 A .原型化方法 B .面向对象方法 C .结构化方法 D .面向服务的方法 答案: B 解析: 面向对象方法使系统的描述及信息模型的表示与客观实体相对应,符合人们的思维习惯,有利于系统开发过程中用户与开发人员的交流和沟通。 2 、 TCP/IP 模型中,( )协议属于网络层的协议。 A . ARP B . SNMP C . TCP D . FTP 答案: A 解析: TCP/IP 模型中,网络层中的协议主要有 IP (互联网协议)、 ICMP (网际控制报文协议)、 IGMP 、 ARP (地址解析协议)和 RARP (反向地址解析协议)等。 3 、( )不属于关系型数据库。 A . Oracle B . MySQL C . SQL Server D . MongoDB 答案: D 解析: 常见的数据库管理系统主要有 Oracle 、 MySQL 、 SQLServer 、 MongoDB 等,这些数据库中,前三种均为关系型数据库,而 MongoDB 是非关系型的数据库。 4