Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Important Solaris Commands Linux/Unix
  • Jai Shree Ram Oracle
  • Linux CPU info. Linux/Unix
  • column level grant syntax Oracle
  • Find Plan Hash value fphv.sql Oracle
  • Find Command Linux/Unix
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • For Search and replace unix command. Linux/Unix
  • UTL_FILE test program Oracle
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • Korn Shell Arithmatic Linux/Unix
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • Optimizer SORT Operations Oracle
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • Find sort details from Db find_sort.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

  • currwait.sql Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • How to calculate PROCESSES parameter Oracle
  • Good Site for Oracle Internals Oracle
  • Drop tempfiles from database Oracle
  • Oracle Release Explaination Oracle

Leave a Reply Cancel reply

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

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Gathering statistics with DBMS_STATS Oracle
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • Search and Replace vi editor command. Linux/Unix
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • DBMS_PROFILER for tuning PLSQL programs. Oracle
  • Reading config file from other folder inside class Python/PySpark
  • metalink all dynamic view reference notes. Oracle
  • 284785.1 How to check RAC Option is currently linked into the Oracle Binary Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme