Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • How to start CRS manually Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • adding new line after specific pattern using sed Linux/Unix
  • Renaming the column name Oracle
  • age_alert.ksh aging out alert.log Linux/Unix
  • Oracle Standby Database Library Index from Metalink Oracle
  • Index Range Scan Oracle
  • Optimizer SORT Operations Oracle
  • Good Doc 28-JUN-2006 Oracle
  • grep multuple patterns Linux/Unix
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix
  • Oracle 11g RAC on OEL 5 and Vmware 2 Oracle
  • eplan9i.sql Oracle

online_bkup.sql

Posted on 15-Sep-2005 By Admin No Comments on online_bkup.sql

set serveroutput on

execute dbms_output.enable(20000);

declare

cursor c1 is

select distinct tablespace_name

from dba_data_files

order by tablespace_name;

cursor c4 is

select member from v$logfile

order by member;

staging_copy_area varchar2(100) := ‘10.201.43.51:/uocdb1/oradata/UOC’;

begin

for cur in c1 loop

dbms_output.put_line (‘alter tablespace ‘ || cur.tablespace_name || ‘ begin backup;’);

declare

cursor c2 is

select file_name

from dba_data_files

where tablespace_name = cur.tablespace_name

order by file_name;

begin

for cur1 in c2 loop

dbms_output.put_line (‘! scp ‘ || cur1.file_name || ‘ ‘ || staging_copy_area );

end loop;

end;

dbms_output.put_line (‘alter tablespace ‘ || cur.tablespace_name || ‘ end backup;’);

end loop;

/********* log file backup **************/

for cur4 in c4 loop

dbms_output.put_line (‘! scp ‘ || cur4.member || ‘ ‘ || staging_copy_area );

end loop;

end;

/

Oracle, SQL scripts

Post navigation

Previous Post: Global Unique Identifier Generation in Oracle 9.2 SYS_GUID()
Next Post: Set Role explaination.

Related Posts

  • Sequence Resetting Oracle
  • How to specify 2 arch location to avoid any kind of DB hanging. Oracle
  • Running PDB on single node in RAC Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • Oracle 11g RAC on OEL 5 and Vmware 2 Oracle
  • Difference between SYNC and AFFIRM 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
  • How to find pinned objects from shared pool. (pinned via dbms_shared_pool.keep) Oracle
  • Creating a Container Database using dbaascli Uncategorized
  • SQL Server: How to see current transactions or requests SQL Server
  • tblwopk.sql tablewopk.sql Oracle
  • All Hints for Oracle Databases Oracle
  • how to find OS block size Oracle
  • Difference between SYNC and AFFIRM Oracle
  • How to calculate PROCESSES parameter Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme