Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle users to automatically increase the partition table     - CentOS 7 Configure logging (VirtualBox) (Linux)

- Installation Strongswan: on a Linux IPsec-based VPN tool (Linux)

- Linux loopback adapter Driven Design (Programming)

- C ++ complex class of operator overloading (Programming)

- Linux desktop system using the remote server in clear text ssh password (Server)

- Use FFmpeg processing high quality GIF (Programming)

- Java memory model subclasses (Programming)

- Through eight skills to let you become a super Linux end-user (Linux)

- MySQL Study of --Percona Server 5.5 Upgrade 5.6 (Database)

- Linux AS4 VPN server in conjunction with a firewall perfect (Linux)

- Installation and Configuration Tomcat environment CentOS 6.6 (Server)

- Red Hat Enterprise Linux 6.4 Configuring VNC Remote Desktop login access (Linux)

- Oracle Database High-Risk Vulnerability Warning (Database)

- Oracle LONG RAW BLOB CLOB type of presentation (Database)

- CentOS 6.5 install Firefox (Linux)

- HAProxy Windows version of the compiler and its application in the CORS (Server)

- How to install web crawler tool in Ubuntu 14.04 LTS: Scrapy (Linux)

- OpenJDK 7 compiled under Ubuntu 14.04.3 64-bit (Linux)

- Use Makeself Create installation file (Linux)

- How to install the latest version of the Eclipse in Ubuntu 14.04 (Linux)

 
         
  Oracle users to automatically increase the partition table
     
  Add Date : 2018-11-21      
         
         
         
  The program can be used as an Oracle JOB execution of the month on the 28th execution (February 28 days to consider the reasons), automatically increase the partition table for the partition under the user. [@ More @]
create or replace procedure guan_add_partition
/ *
/ * All of a user partition table partition partition automatically increase as date types, partition name similar to:. P200706.
* /
as
v_table_name varchar2 (50);
v_partition_name varchar2 (50);
v_month char (6);
v_add_month_1 char (6);
v_sql_string varchar2 (2000);
v_add_month varchar2 (20);
cursor cur_part is select distinct u.table_name, max (p.partition_name) max_part_name from user_tables u, user_tab_partitions p
where u.table_name = p.table_name and u.partitioned = 'YES'
group by u.table_name;
Begin
select to_char (sysdate, 'yyyymm') into v_month from dual;
select to_char (add_months (sysdate, 1), 'yyyymm') into v_add_month_1 from dual;
select to_char (add_months (trunc (sysdate, 'mm'), 2), 'yyyy-mm-dd') into v_add_month from dual;
open cur_part;
loop
fetch cur_part into v_table_name, v_partition_name;
exit when cur_part% notfound;
if to_number (substr (v_partition_name, 2)) <= to_number (substr (v_month, 1)) then
v_sql_string: = 'alter table' || v_table_name || 'add partition p' || v_add_month_1 ||
'VALUES LESS THAN (to_date (' '' || v_add_month || '' ',' 'yyyy-mm-dd' ')) tablespace users';
execute immediate v_sql_string;
else
null;
end if;
end loop;
close cur_part;
end;
     
         
         
         
  More:      
 
- Preview function to confirm the stop resource Oracle 12c new feature crsctl (Database)
- CRF ++ Linux use (Linux)
- Ubuntu Live CD by updating Grub resume boot the Boot Menu (Linux)
- Windows 8.1 hard drive to install Ubuntu 14.04 dual system reference tutorials and multi-drive Precautions (Linux)
- ORA-00600 error solve one case (Database)
- How to track performance issues when using the Unity Game Development Android (Programming)
- Understand the security restore accidentally deleted critical system files (Linux)
- Oracle database NUMBER (x, y) data types (Database)
- Use chattr and lsattr command to manage linux files and directory attributes (Linux)
- Kali Linux 2.0 U disk installation errors Your installation cd-rom could not be mounted (Linux)
- Object-C in the preparation of multi-parameter function parameter is omitted (Programming)
- Learning C language pointer essays (Programming)
- ThinkPad X201i installation notes Debian 7.5 (Linux)
- Why learn and use C language (Programming)
- Linux C source code (Ascii HexToBinary: Converts hexadecimal string format ASCII codes) (Programming)
- C ++ virtual functions Classic Insights (Programming)
- CentOS yum configuration under local sources (Linux)
- Ubuntu 12.04 installation DHCP Server (Server)
- CentOS 6 rapid deployment of Java applications (Linux)
- Linux operating system security settings initial understanding (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.