Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Jai Shree Ram Oracle
  • JSON/XML Types in Oracle Oracle
  • Explain Plan Output 2 Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • Reading config file from other folder inside class Python/PySpark
  • Complete Git Tutorial for Beginners GIT
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • Renaming Oracle Instance Name Oracle
  • shutdown linux Linux/Unix
  • AWR settings- MMON is not taking snapshot. Oracle
  • compile_inv.sql Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Checking SQL Server Version SQL Server
  • FRA Information. Oracle

online_ts_bkup.sql

Posted on 29-Jul-2005 By Admin No Comments on online_ts_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 c3 is

select name from v$controlfile

order by name;

cursor c4 is

select member from v$logfile

order by member;

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

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;

/********* Binary control file backup **************/

for cur3 in c3 loop

dbms_output.put_line (‘! scp ‘ || cur3.name || ‘ ‘ || staging_copy_area );

end loop;

/********* Binary control 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: switchlogfile.sh
Next Post: Paste command syntax

Related Posts

  • sid_wise_sql.sql Further explaination Oracle
  • Check Oracle installed products using one command Oracle
  • New OFA for 11g Oracle
  • Specify the Rollback segment to use in Transaction Oracle
  • Find All internal Parameters Oracle
  • Adding or Dropping Online Redo Log Files When Physical Standby in place 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
  • metalink all dynamic view reference notes. Oracle
  • executing Function from SQLPLUS prompt Oracle
  • Implementing Listener Security Oracle
  • Rename Tablespace Oracle
  • find_err.sql for finding errors from dba_errors. Oracle
  • scripts to take listener.log backup Linux/Unix
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • chk_space_SID.ksh Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme