Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • get_vmstat.ksh Linux/Unix
  • track_autoupgrade_copy_progress.sql Oracle
  • Monitor Long Running Job Oracle
  • arch_configUOCIOTTO.ora Oracle
  • New OFA for 11g Oracle
  • Running select from V$ views from remote server Linux/Unix
  • Absolute file number and relative file number Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • Import and export statements Oracle
  • fkwoindex.sql /* Find FK without Index */ Oracle
  • plan10g.sql Oracle
  • compile_inv.sql Oracle
  • Removing first line Linux/Unix
  • fuser to check who is using diretory Linux/Unix
  • TNSNAMES entries details 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

  • RAC with RHEL4 and 11g Oracle
  • To find explain plan for a statement that occurred in past. Oracle
  • find_string_in_database.sql Oracle
  • How to start CRS manually Oracle
  • Gathering statistics with DBMS_STATS Oracle
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle

Leave a Reply Cancel reply

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

Categories

  • AMC10 (0)
  • 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 (9)
  • Videos (0)

Recent Posts

  • Tutornet.US — Source of excellent learning14-Oct-2026
  • OCI Infrastructure Patching14-Oct-2026
  • Free API credits for AI models14-Oct-2026
  • AMC1020-Sep-2026
  • 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

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Rename Tablespace Oracle
  • lck.sql Oracle
  • Find all users who have DML privileges Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • find_encr_wallet.sql Uncategorized
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • runon_allcdbs_find_pdbs.sh Linux/Unix
  • Jai Shree Ram Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme