Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • find_string_in_database.sql Oracle
  • Giving Grant on v$DATABASE Oracle
  • find_longsql.sql Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • Jai Shree Ram Oracle
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • Good Link from metalink 1 Oracle
  • Oracle Standby Database Library Index from Metalink Oracle
  • SQLPLUS COPY command Precautions. Oracle
  • Temporary Tablespace Information and restriction. Oracle
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix
  • SQL_PROFILE – I explaination Oracle
  • USE_NL and INDEX hints example Oracle
  • how to find VIP from ifconfig Linux/Unix
  • shr1.sql for MTS or Shared server configuration 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

  • CTAS with LONG Column for 7.x and 8 and 8i Oracle
  • UTL_FILE test program Oracle
  • standard Monitoring – 1 Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • online_ts_bkup.sql Oracle
  • Physical Standby switchover with session active 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 (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • 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
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • rm_backup_arch_file.ksh Linux/Unix
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • export import with parameter file. Oracle
  • Search and replace editor command in vi Linux/Unix
  • CPU Core related projections AWS
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • get_vmstat_solaris Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme