Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Rollback force for distributed transactions Oracle
  • For Perl DBI installation and testing program PHP/MYSQL/Wordpress
  • find_pk.sql /* Find Primary Key */ Oracle
  • Good Link from metalink 1 Oracle
  • Default User Profile Oracle
  • upload.html PHP/MYSQL/Wordpress
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • Implementing Listener Security Oracle
  • find_longsql.sql Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • prepfiles.sh for step by step generating pending statistics files Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • Add new columns in dataframe Python/PySpark
  • get_aix_vmstat.ksh Oracle

cp_filesystem.sql

Posted on 15-Sep-2009 By Admin No Comments on cp_filesystem.sql

exec dbms_output.enable(10000);

set lines 130 pages 1000

set serveroutput on size 1000000

declare

cursor c1 is

select substr(name,1,61) complete_filename, bytes/(1024) KB,

substr(name, instr(name, ‘/’, -1)+1) only_filename

from v$datafile order by file#;

threshold_kb number(10) := 94000000 ;

size_counter number := 0;

mountpoint_counter number := 1;

mountpoint_prefix varchar2(10) := ‘/800t’;

common_mountpoint_prefix varchar2(15) := ‘/oradata/800T/’;

target_filename varchar2(61);

begin

for cur in c1 loop

if size_counter >= threshold_kb then

dbms_output.put_line (‘*************** Mountpoint ‘ || mountpoint_counter || ‘ Size reached ‘ || size_counter);

size_counter := 0;

mountpoint_counter := mountpoint_counter + 1;

end if;

select mountpoint_prefix || mountpoint_counter || common_mountpoint_prefix || cur.only_filename

into target_filename

from dual;

dbms_output.put_line(‘ panther1:’ || target_filename );

— dbms_output.put_line(‘scp -p ‘ || cur.complete_filename || ‘ 127.0.0.1:’ || target_filename || ‘;’);

— dbms_output.put_line(‘cp -p ‘ || cur.complete_filename || ‘ panther1:’ || target_filename || ‘;’);

size_counter := size_counter + cur.KB;

end loop;

dbms_output.put_line (‘*************** Mountpoint ‘ || mountpoint_counter || ‘ Size reached ‘ || size_counter);

end;

/

Oracle, SQL scripts

Post navigation

Previous Post: Caching sequence in Memory
Next Post: To see how much time or progress of long transaction

Related Posts

  • Sequence Resetting Oracle
  • Implementing Listener Security Oracle
  • Rman Notes -1 Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Find execution plan from dba_hist_sql_plan for a specific SQL_ID and PLAN_HASH_VALUE fplan.sql Oracle
  • Good Oracle Architecture In Short and point to point Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (150)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (151)
  • SQL scripts (349)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sh23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • find checksum of a file. Linux/Unix
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • To see only files and/or folders using LS command Linux/Unix
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • backspace in SQL Plus not working then..? Linux/Unix
  • Find Multiple levels of object dependencies : depen.sql Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme