oracle12c

How to collect data from INMEMORY partition?

这一生的挚爱 提交于 2019-12-11 12:12:08
问题 I'm tuning Oracle 12c DB and trying to load some tables to INMEMORY partition. So, I'm altered 2 tables with CRITICAL PRIORITY . But, when I'm trying to SELECT some data from table in memory, it collects from general patition. I've got it from Autotrace. What I'm doing wrong? 回答1: The IMCO(Inmemory Coordinator) process wakes up every two minutes and checks to see if any population tasks needs to be completed. So, querying a table immediately after enabling it for inmemory doesn't ensure that

Bpel 12c - Call webservices with basic authentication

北城余情 提交于 2019-12-11 12:08:53
问题 I'm using Oracle BPEL 12c to develop a process. I need to call a external service with basic authentication. I need to pass the credentials received on my exposed service endpoint to the external service. When i call, i receive this: <remoteFault xmlns="http://schemas.oracle.com/bpel/extension"> -<part name="summary"> <summary> oracle.fabric.common.FabricException: oracle.fabric.common.FabricException: Error in getting XML input stream:XXXXXX?WSDL: Server Authentication Required: Error in

Invoking Oracle package function before ActiveRecord query executions

我只是一个虾纸丫 提交于 2019-12-11 10:03:03
问题 I'm migrating an existing app to Rails 5 and using Devise for authentication. Database is Oracle12c. I'm trying to figure out how to execute the following sql on the rails connection whenever a user would query the database. This context is required for the schema triggers to function correctly and this context should reflect the username of the user that is executing the query. begin main.ENV_VAR.prc_set_context_value('UserContext', '#{current_user}'); end; Is there some sort of ActiveRecord

Oracle 12c - SQL string build issue

那年仲夏 提交于 2019-12-11 08:44:49
问题 This is a follow up to a previous question: Dynamically build select statement in Oracle 12c I am trying to build a select statement dynamically but having a problem building the column alias names. The column alias name must be retrieved from MAIN_TABLE. Please refer to the code inside <> below: declare upper_level number; t_sql varchar2(1000); t_sql_val varchar2(500); l_sql varchar2(1000); begin --upper_level will always be given select 3 into upper_level from dual; --build the fixed string

Grant create any trigger vs grant create trigger

◇◆丶佛笑我妖孽 提交于 2019-12-11 08:02:11
问题 In Oracle you can grant system privileges like GRANT CREATE TRIGGER TO MY_USER; But you can as well grant privileges this way GRANT CREATE ANY TRIGGER TO MY_USER; As system privileges are system-wide, where is the difference between the 2 statements above. Does the additional ANY -keyword grant anything else more than system? If I add a Grant ... ON SCHEMA ... it's no system privilege anymore, is it? Assumption is that there are multiple schemas/objects in the database from different users

How to update a part of JSON string in Oracle 12c?

主宰稳场 提交于 2019-12-11 07:33:05
问题 I've a table in my oracle DB as below. CREATE TABLE my_table( id RAW(16) NOT NULL, data CLOB, CONSTRAINT my_table_pk PRIMARY KEY (id), CONSTRAINT my_table_json_chk CHECK (data IS JSON) ); INSERT INTO my_table (id, data) VALUES (SYS_GUID(), '{ "FirstName" : "aa", "LastName" : "bb", "Address" : { "Street" : "99 My Street", "City" : "My City", "Country" : "UK", "Postcode" : "A12 34B" }'); Now I know, I can fetch value of a specific property like address of the JSON string using $. Similarly, can

Open a BufferedReader in UTF-8

瘦欲@ 提交于 2019-12-11 06:19:20
问题 I have a csv file with characters like Cité , but after make the insert into the DB, I see this Cit¿ I open the file as a BufferedReader , but I don't know how to do it in UTF-8 BufferedReader br = new BufferedReader(new FileReader(csvFile)); 回答1: You could explictly use a FileInputStream and an InputStreamReader using StandardCharsets.UTF_8 , but it's probably simpler to use Files.newBufferedReader: Path path = Paths.get(csvFile); try (BufferedReader reader = Files.newBufferedReader(path)) {

ORACLE - JSON To Key Value Pair Table

假如想象 提交于 2019-12-11 05:52:18
问题 Is there any way to obtain a table with key/value pairs from a CLOB Json Column? The idea here is to get these values, on a dynamic way. Because the CLOB column does not always contain the same structure. I've created a function that does this, however since it literally parses the json string, when we use it in a table with many records its very slow. And by very slow I mean like 2-5 records per second, i know it's terrible. The Oracle tools (v.12c) do not provide a dynamic way to obtain the

Bind variable used in BEGIN/END gets cleared

故事扮演 提交于 2019-12-11 05:48:42
问题 This is a trivialized example so it is easy to reproduce, but the important thing is I need to set a variable based on a query using into :someVariable from sometable where sometable.somecolumn = :y and then leverage both variables after the BEGIN/END block. It seems referencing :y in the where causes it to be cleared. Why does this happen? I am more concerned with why does this happen than how to fix it. I have the work around of setting it with itself, but it seems like an odd side affect.

Supported server versions for Oracle 12c client

会有一股神秘感。 提交于 2019-12-11 02:02:44
问题 I am not able to find any information on if an Oracle 12c client is going to be able to connect to a Oracle 10.1.0.5 server installation (on a diffrent machine). Both in a Windows enviroment. Does anyone have information on this? 回答1: As mentioned in the documentation, note 207303.1 on the Oracle Support site has an interoperability matrix between client and server versions. That says that the 12c client is not supported with a 10.1 server, and indeed that connections will error. (You'll need