Skip to main content

All Questions

0 votes
3 answers
59 views

Oracle Partition in For Loop Select

I need to fetch all rows in a specific partition of a table and print the values to a file. CREATE OR REPLACE PROCEDURE WriteRecordToFile ( mypartition IN VARCHAR2, myfilename IN VARCHAR2, ...
user2940105's user avatar
0 votes
2 answers
5k views

How to automate partition drop and alter table activity in oracle sql developer

I need a procedure that will help me to drop partition older than 3 months (current month + last 3 older months). And then I need to create the new partition in sequence. for example if current ...
Deepika Sheldar's user avatar
2 votes
0 answers
681 views

Create Table in a Loop inside Stored Procedure Oracle SQL

I am attempting to create a Oracle stored procedure which creates partitioned tables based off of a table containing the table names and the column to be partitioned with. A separate PL/SQL block ...
Avishek Datta's user avatar
2 votes
0 answers
806 views

Auto partition the existing tables that we used to manually add the partitions by splitting the max partition in Oracle

I need suggestions on adding partitions on to the existing manually partitioned tables. My case: version : Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production Existing table data ...
B Red's user avatar
  • 33
0 votes
1 answer
233 views

Partitioning an Existing Table using DBMS_REDEFINITION

I have a table and I want to partition it, so I start partition it using DBMS_REDEFINITION and I work like this article DBMS_REDEFINITION my problem when I start to redefine my table using this code : ...
M.Youssef's user avatar
  • 148
1 vote
2 answers
1k views

Return the table_name and partition_name whose count have a value of 0

I'm trying to writing a query that return the table_name and partition_name whose count of that partition have a value of 0. I've got the below query that return the SELECT COUNT() of the tables and ...
tefached616's user avatar
1 vote
1 answer
456 views

Oracle {LIST} Partition by Program and {RANGE} subpartition by DATE with interval

I'm trying to figure the best possible way to determine the partition strategy in Oracle 12c (12.2.0.1.0) This post is almost identical to my requirements. However, I want to know the best possible ...
AJORA's user avatar
  • 37
0 votes
1 answer
3k views

ORA-14308: partition bound element must be one of: string, datetime or interval literal, number, or NULL

CREATE OR REPLACE PROCEDURE pro_alter_partition(INTERFACE_ID VARCHAR2) AS L_partition_name VARCHAR2(100); L_subpartition_name VARCHAR2(100); L_subpartition_inc ...
Vikram's user avatar
  • 35
2 votes
1 answer
316 views

How do you set Incemental to true for multiple tables with the same owner using DBMS_STATS.set_table_prefs?

I have around 40-50 tables in my oracle database that are partitioned. Using DBMS_STATS.set_table_prefs, I want to set "Incremental" to true for all of my partitioned tables. Can anyone help me with ...
user9766188's user avatar
17 votes
2 answers
19k views

What is the algorithm used by the ORA_HASH function?

I've come across some code in the application I'm working on that makes a database call merely to call the ORA_HASH function (documentation) on a UUID string. The reason it's doing this is that it ...
Kaypro II's user avatar
  • 3,350
0 votes
0 answers
988 views

Composite Interval Partitioning - First by month and subpartition by date - Oracle 11g R2

We have to pull snapshot data from the source(SQL Server) to target(Oracle). The data in the source is mostly appended everyday although there could be few deletes and updates. Since the data is ...
GiveSeek's user avatar
0 votes
0 answers
211 views

Update 30k to 40k records from screen all with different values

I have a screen where a user click a button to start a process and the backend process will update a set of records (around 20k - 60k ) with different values (wat ever it should be). The "Where" ...
chapter473's user avatar
0 votes
2 answers
4k views

alter table add partition using a procedure oracle g11

I'm trying to add partitions by month on a partitioned table using a procedure that will be ran each year on January 1. create or replace procedure create_partitions as part VARCHAR2(50); ...
user2035693's user avatar
0 votes
1 answer
2k views

Partition excisting table on a specific ID

I have an Oracle SQL question. I need to partition a existing table (filled with data) on a specific ID. I did some research but I don't see how. When I generate a script from a already made ...
Deirfnrew's user avatar
1 vote
0 answers
2k views

Looping in an oracle table based on partitions

I am creating a Query which is taking data from multiple other databases through DBlinks. One of the table "ord" in a Query is immensely large , say more than 50 million rows. Now, I want to create ...
Incredible's user avatar

15 30 50 per page